UIPageViewController - Removing current page

I need to implement a photos scroller with the ability to delete photos. I wanted to use a UIPageViewController to scroll between photos but can't find a way to remove current page when deleting the current photo. The only solution I could find is to put a new UIPageViewController (that use the updated data source) over the old UIPageViewController and discard it... What do you think???

Replies

Hi,


what about calling

- (void)setViewControllers:(NSArray<UIViewController *> *)viewControllers direction:(UIPageViewControllerNavigationDirection)direction animated:(BOOL)animated completion:(void (^)(BOOL finished))completion;

This way you can load a new viewController to be displayed at any time.