Open happiehappie opened 7 years ago
Change "contentOffset" property to "bounds.origin":
scrollView.bounds.origin = CGPoint(x: 0, y: offsetY + triggerPoint * 2)
Setting content offset manually triggers func scrollViewDidScroll(_ scrollView: UIScrollView)
where you setting offset again etc. Recursive calls lead to crash.
Steps to reproduce (even in demo project, no modification needed) Not sure if this is for every mode but I encountered this in DateMonth + Year. Steps to reproduce:
It then crashes at
scrollView.contentOffset = CGPoint(x: 0, y: offsetY + triggerPoint * 2)