弹出视图控制器中的导航栏样式
在 iPhone SDK 4.2.3 中,使用默认的分割视图模板来制作虚拟应用程序。
在横向模式下,主视图使用默认的导航栏样式。在纵向模式下,主视图在弹出窗口内使用黑色导航栏样式。如何更改条形样式/色调颜色以使其在两个视图中保持一致?
我尝试在分割视图委托方法中执行此操作,但它不起作用。
pc.contentViewController.navigationController.navigationBar.barStyle = UIBarStyleDefault;
pc.contentViewController.navigationController.navigationBar.tintColor = [UIColor redColor];
我还尝试在主视图控制器类中显式设置导航栏样式,但这似乎也没有任何影响。
In iPhone SDK 4.2.3, use default Split View template to cook-up a dummy application.
In landscape mode, the master view uses default navigation bar style. In portrait mode, the master view uses black navigation bar style inside the popover. How can i change the bar style/tint color to make it consistent for both views?
I've tried to do this in split view delegate method, but it doesn't work.
pc.contentViewController.navigationController.navigationBar.barStyle = UIBarStyleDefault;
pc.contentViewController.navigationController.navigationBar.tintColor = [UIColor redColor];
I've also tried to explicitly set the navigation bar style in the master view controller class, but that doesn't seem to have any impact as well.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
经过一番尝试后,我可以肯定地说这是不可能的。
After playing around, i can safely say that it's not possible.