我在UIPageViewController
内部有UITableView
,并且滑动事件似乎没有传递给UITableView
。从UIPageViewController向UITableView传递删除轻扫手势
我能够禁用我的UIPageViewController
的边缘弹跳,但我仍然没有找到一种方法来一致地启用滑动来删除我的UITableView
。
在此示例中,它需要多个挥笔得到的删除按钮来显示。该手势在实际设备上非常挑剔
页面在右侧没有其他页面,因此UIPageViewController
没有理由需要滑动。
在viewDidLoad
我:
for view in self.pageViewController.view.subviews {
if let scrollView = view as? UIScrollView {
scrollView.delegate = self
}
}
下面,我有:
有很多不同的答案相关的帖子,但没有人对我的使用情况下工作。
这是比我的问题的解决方案更多的替代方案,但我只是使用MGSwipeTableCell。这很容易实现。 https://github.com/MortimerGoro/MGSwipeTableCell – ChrisRockGM