I'm currently building a app using UIPageViewController
. It is working as I expected until it reaches last page which contains numbers of UITextField.
But when I tapped one of instances of UITextField, it suddenly jumps to the previous page without any reason instead of showing a keyboard. When I scroll through to the last page and tap a text field again, it works well without any problem.
It is also fine when it shows last page immediately by tapping the navigation button that links to the last page and that is attached to the UIPageViewController instance.
This problem happens only when I scroll through pages from first to the last, and it happens only once at the first try.
I suspected low memory issues, so I set breakpoints in -didReceiveMemoryWarning
method of both UIPageViewController instance and the last page view controller. But they were never called.
The second try is that I added a breakpoint in the last page view controller's -willMoveToParentViewController:
method and set its condition to parent == nil
(when it's removed from parent view controller, which is the UIPageViewController instance in question)
When I run the app, the breakpoint's call stack says that the method is called by UIPageViewController's -_flushViewController:animated:
.
I don't know why this -flushViewController:animated: is called. If I can figure out the cause, it will help me with fixing the problem.
Is there anybody who can help me?