Reputation: 3259
I have implemented page view in my app. It has three pages. On second page, there is scroll view and i have set its content size in viewWillAppear method. It works fine when i visit second page for the first time, but when i go to 3rd page and return on second page, content size isn't always set. Sometimes its set but that too takes few seconds and then scrolling starts. Can anyone please help?
Also, can anyone please tell me which method is ALWAYS called whenever we navigate in UIPageViewController from one page to another?
Upvotes: 0
Views: 1043
Reputation: 30488
You will have to set the contentSize in
-(void)viewWillLayoutSubviews {
// your code here
}
method, because this method is called after viewDidLoad
method.
Upvotes: 2