ViewWillAppear not working on ScrollView subviews
please help. I have been searching for the solution to this question but no luck. I have a horizontal scrollview that has two pages as subviews and I can horizontally scroll between them. Not, I want to trigger an event that will tell me when one of them (the two pages) is show. I have successfully added viewWillAppear to ScrollView but when I add it to the subviews, the method is not triggered. Thank You in advance.
Inspect the UIScrollView
's contentOffset
property when scrollViewDidScroll:
is called on the delegate (You'll have to assign a UIScrollViewDelegate
). viewDidAppear
is designed to be called on UIViewControllers
under very specific conditions.