How do I reset UIScrollView to Zeroth Page/Index when Clicking on a Tab Bar Item?
I have a tab bar application with 3 tabs. The first tab loads a UIImageView that is nested within a paginated ScrollView. If the user were to scroll through the pages for a bit, then click on another tab, and then click back to the first tab, they would return to the last page they scrolled to within the ScrollView.
How can I have make my f开发者_开发问答irst tab bar item resets to the initial image/page in my UIImageView every time it's clicked?
Thanks!
Have a look at : UITabBarControllerDelegate. You have a callback didSelectViewController. One solution would be for your ApplicationDelegate to get this callback and inform your firstviewcontroller from the first tab to call a method that would just take the user to the first page.
精彩评论