2

I have UIButton inside cell of UITableView, When i touch the button it is actually working but the animation of highlighted is not being seen, I have tried setting delaysContentTouches = false on viewDidLoad and also on IB

I even tried to find UIScrollVIew of table view so that i can set that properties to false, like...

 for cls in cell.subviews
    {
        println("name of class is ::\(NSStringFromClass(cls.classForCoder))")
        if NSStringFromClass(cls.classForCoder) == "UITableViewCellScrollView"
        {
       cls.scrollView.delaysContentTouches = false
            break
        }
    }

Thanks in advance!

dip
  • 3,548
  • 3
  • 24
  • 36

1 Answers1

1

UITableView subclass

override public var delaysContentTouches: Bool {
    didSet {
      if let subviews = self.subviews as? [UIView] {
        for view in subviews {
          if let scroll = view as? UIScrollView {
            scroll.delaysContentTouches = delaysContentTouches
          }
          break
        }
      }
    }
  }
zendobk
  • 548
  • 1
  • 5
  • 17