Answer the question
In order to leave comments, you need to log in
How to update UIPageViewController with new objects?
Good day.
Can you please tell me how to update UIPageViewController with new data?
It is called via pushViewController and is located on the navigation stack. Let's say I delete one of the objects in the UIPageViewController (one of the sheets, for example). How then to call the UIPageViewController with new objects, while saving the stack in the navigation? (that is, calling pushNavigation again will not work).
Thanks
Answer the question
In order to leave comments, you need to log in
stackoverflow.com/questions/15325891/refresh-uipag...
If you do not understand English, then briefly:
- insert this method into the delegate
func pageViewController( pageViewController: UIPageViewController,
didFinishAnimating finished: Bool,
previousViewControllers: [UIViewController],
transitionCompleted completed: Bool)
{
if !completed { return }
dispatch_async(dispatch_get_main_queue())
{
pageViewController.dataSource = nil
pageViewController.dataSource = self
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question