我想用导航栏和表格视图制作一个简单的视图。所以我创建了一个子类,UINavigationController并在其中添加了一个UITableView。我的也是UITableViewDataSourceand UITableViewDelegate。现在我想UIBarButton在导航栏中添加,但它不起作用:
UIBarButtonItem *anotherButton = [[UIBarButtonItem alloc] initWithTitle:[[Translator instance] getTranslation:@"Back"]
style:UIBarButtonItemStylePlain
target:self.parentViewController
action:@selector(dismissFiltersModal:)];
self.navigationItem.backBarButtonItem = anotherButton;
显示视图但没有显示按钮没有错误。我该怎么做才能显示它?