ios – UITableViewCell内的UIPageViewController

嘿,我想问一下如何在UITableViewCell中实现UIPageViewController.

我一直在阅读,但到目前为止似乎没有任何人尝试.

我会很感激一些提示,不需要一个完整的答案..

谢谢!.

解决方法

目前还不清楚你到底想要做什么,但让我看看能否解释一下.您希望在表视图单元格中具有页面视图控制器视图.

您需要为每个单元格创建一个页面视图控制器,将其视图调整为单元格内容视图的大小,并将视图添加为单元格的子视图.然后,您必须实现页面视图控制器的数据源并在单元格内委托方法.

就像是:

self.pageViewController = [[UIPageViewController alloc] initWithTransitionStyle:UIPageViewControllerTransitionStyleScroll navigationOrientation:UIPageViewControllerNavigationOrientationHorizontal options:nil];
[self.pageViewController setDataSouce:self];
[self.pageViewController setDelegate:self];
[self.pageViewController.view setFrame:self.contentView.bounds];
self.contentView addSubview:self.pageViewController.view];

然而,这是一种奇特的设计,看起来过于复杂.

以上是来客网为你收集整理的ios – UITableViewCell内的UIPageViewController全部内容,希望文章能够帮你解决ios – UITableViewCell内的UIPageViewController所遇到的程序开发问题。

如果觉得来客网网站内容还不错,欢迎将来客网网站推荐给程序员好友。