嘿,伙计们,我想看看有没有人知道如何更新UIPageViewController中的页面数
UIPageViewController具有以下方法
- (NSInteger)presentationCountForPageViewController:(UIPageViewController *)pageViewController {
return count;
}但这在一开始就被称为,没有办法更新它。使用表视图,您可以调用[tableView reloadData]
有人知道如何为UIPageViewController“重新加载”数据吗?
谢谢各位
发布于 2017-05-01 00:16:44
使用UIPageViewController的setViewControllers方法:
- (void)setViewControllers:(NSArray<UIViewController *> *)viewControllers
direction:(UIPageViewControllerNavigationDirection)direction
animated:(BOOL)animated
completion:(void (^)(BOOL finished))completion;在UIPageViewController上调用此方法,并将您想要显示的视图控制器传递给它。
https://stackoverflow.com/questions/43712682
复制相似问题