我在视图控制器中嵌入了一个容器视图。容器用于显示不同的视图控制器。如何更改标题或在父级导航栏中添加按钮?
谢谢!
我在视图控制器中嵌入了一个容器视图。容器用于显示不同的视图控制器。如何更改标题或在父级导航栏中添加按钮?
谢谢!
You can access the navigationItem that controls those attributes directly as so (assuming self = your childViewController:
[self.parentViewController.navigationItem setTitle:<Your Text>];
[self.parentViewController.navigationItem setLeftBarButtonItem:<Your Button>];