ios - Scroll is not detected in embedded ScrollView when Autolayout is enabled -
layout a - scroll detected in both scrollviews
-view
----scrollview1
------contentview1
----scrollview2
------contentview2
layout b - scroll not detected in scrollview2
-view
---scrollview1
-----contentview1
--------scrollview2
----------contentview2
layout both scrollviews works autolayout enabled.
layout b scrollview2 not work autolayout enabled.
when trying both layouts i'm running code set contentsizes:
- (void)viewdidlayoutsubviews{ [super viewdidlayoutsubviews]; self.scrollview1.contentsize = self.contentview1.frame.size; self.scrollview2.contentsize = self.contentview2.frame.size; }
how can scrollview in layout b working autolayout enabled?
i'm using ios 7.1
adding constraints correctly solved problem. video helpful https://www.youtube.com/watch?v=4ocwxhlbq-a
Comments
Post a Comment