[iOS] UIPageViewController Test Note

對於UIPageViewController操作的簡單筆記:

Environments:

  • Xcode Version 7.1 (7B91b)
  • iOS 9.1
  • iPhone6 simulator
  • 5 view controllers with different view tag and background colors

Method

The following methods are all abbreviated but I think they are clear enough.

Datasource

  • viewControllerBeforeViewController:
  • viewControllerAfterViewController:

Delegate

  • willTransitionToViewControllers:
  • didFinishAnimating:previousViewControllers:

Action

The title is the action I did and context are the methods called order by compiler. After the colon, they are notified the arguments passed in.

Slight scroll

  • viewControllerAfterViewController: first vc
  • viewControllerBeforeViewController: first vc
  • willTransitionToViewControllers:

Touch up

  • didFinishAnimating:previousViewControllers: animating finish but transisiton not complete.

Slight scroll again

  • willTransitionToViewControllers:

Scroll to next page

  • didFinishAnimating:previousViewControllers: animating and transistion are all finished and completed.
  • viewControllerAfterViewController: second vc

Slight scroll again

  • willTransitionToViewControllers:

Scroll back to previous page

  • didFinishAnimating:previousViewControllers: animating and transistion are all finished and completed.
  • viewControllerBeforeViewController: first vc

留言