M
M
mr_drinkens892016-09-16 21:50:44
Objective-C
mr_drinkens89, 2016-09-16 21:50:44

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

1 answer(s)
B
briahas, 2016-09-22
@briahas

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
    }
}

, this does not affect the currently displayed page.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question