【发布时间】:2014-02-23 12:42:46
【问题描述】:
在我当前的应用程序中,我有三个 UIViewControllers,我正在使用 StoryBoard:
ViewController、MenuViewController、CategoriasListViewController。
为了从 ViewController 中显示 MenuViewController,我使用了一个按钮操作。 为了从 MenuViewController 返回到 ViewControler,我使用了一个带有以下操作方法的 BarButton 项:
- (IBAction)backButton:(id)sender {
[self.navigationController popViewControllerAnimated:YES];
}
为了从 MenuViewController 显示 CategoriasListViewController,我还使用了一个按钮操作。 要从 CategoriasListViewController 返回到 MenuViewControler,我使用的是带有以下操作方法的 BarButton 项(同上):
- (IBAction)backButton:(id)sender {
[self.navigationController popViewControllerAnimated:YES];
}
但在这种情况下,MenuViewController 没有显示,BarButton 动作被忽略。
我正在使用自定义的 BarButton 操作而不是默认的后退按钮,因为在标题背景中我有一个带有徽标的图像,该徽标将与默认的后退按钮重叠。 欢迎任何帮助。谢谢。
更新 1:这是我的故事板:
【问题讨论】:
标签: ios uibarbuttonitem