I have a UIButton
instance inside a UIStackView
as shown in the bellow view hierarchy
I'm using SwipeView library.
- UIView
- UIScrollView
- UIStackView
- UIView
- UIStackView (Horizontal)
- UILabel - UIButton
I have done everything from setting 'isExclusiveTouch
', 'delaysContentTouches
' properties to subclassing UIScrollView
to override methods (UIScrollview delaysContentTouches issue). None of this has worked out for me so far.
Thanks in advance.
Update
Adding view controller as child fixed the issue
func swipeView(_ swipeView: SwipeView!, viewForItemAt index: Int, reusing view: UIView!) -> UIView! {
let swipeView = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "swipe_view") as! SwipeViewController
swipeView.loadViewIfNeeded()
if let stat = userInfo.stats?[index]{
swipeView.stat = stat
}
//Adding these lines fixed the issue.
self.addChildViewController(swipeView)
swipeView.didMove(toParentViewController: self)
return swipeView.view
}