Objective c 目标C:PageViewController的导航栏

Objective c 目标C:PageViewController的导航栏,objective-c,uipageviewcontroller,Objective C,Uipageviewcontroller,我有一个UITableViewController被添加到一个UIPageViewController中作为页面,程序在PageViewController的顶部推送PageViewController并显示UINavigationBar,我想在UINavigationBar中添加UIBarButton来控制UITableViewCells,但只能在PageViewController的屏幕上执行,这意味着,与此按钮相关的所有事件必须在PageViewController中处理,因为所有这些事件

我有一个UITableViewController被添加到一个UIPageViewController中作为页面,程序在PageViewController的顶部推送PageViewController并显示UINavigationBar,我想在UINavigationBar中添加UIBarButton来控制UITableViewCells,但只能在PageViewController的屏幕上执行,这意味着,与此按钮相关的所有事件必须在PageViewController中处理,因为所有这些事件都与TableView单元格控件相关,所以我希望它们在UITableViewController中处理


我尝试了很多方法,比如在UITableViewController中定义一个IBOutlet,当viewDidLoad加载时,将self.NavigationItem rightitem设置为此IBOutlet项,所有方法都不起作用。

我不知道您是如何创建UINavigationController的,但我假设您是从PageViewController中创建的。如果是这种情况,请确保PageViewController将UITableViewController推送到UINavigationController上。无法将UITableViewController添加到PageViewController

换句话说,PageViewController使用UINavigationController创建页面。然后将UITableViewController推到UINavigationController上


此时,在子类UITableViewController中,您应该可以访问self.navigationItem等。

是否有用于tableview控制器或page view控制器的导航控制器?