我想用导航栏和表格视图来制作一个简单的视图。所以我创建了一个UINavigationController
的子类,并在其中添加了一个UITableView
。我的也是UITableViewDataSource
和UITableViewDelegate
。现在我想在导航栏中添加UIBarButton
,但它不工作:UIBarButton不会显示在我的UINavigationController中
UIBarButtonItem *anotherButton = [[UIBarButtonItem alloc] initWithTitle:[[Translator instance] getTranslation:@"Back"]
style:UIBarButtonItemStylePlain
target:self.parentViewController
action:@selector(dismissFiltersModal:)];
self.navigationItem.backBarButtonItem = anotherButton;
没有错误时显示的视图,但不是按钮。我该如何显示它?
伟大工程:)因为我呈现视图为模态的看法是有规定的方式,让来电者MyController中的引用?因为如果我使用self.parentViewController,它会引用UINavigationController nc,而不是从我提交模态视图的对象(这是正常的我猜)。 – Alexis