从弹出窗口呈现模态视图控制器
我有一个位于弹出窗口内的视图控制器,我想从中呈现一个模式视图控制器。这是我的代码:
EditDateViewController *dateViewController = [[EditDateViewController alloc] initWithNibName:@"EditDateViewController" bundle:[NSBundle mainBundle]];
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:dateViewController];
navController.modalPresentationStyle = UIModalPresentationCurrentContext;
[self presentModalViewController:navController animated:YES];
[dateViewController release];
[navController release];
结果是这样的:
alt text http://cl.ly/5300e4f8f5d440d3f850/content
由于某种原因,导航栏背景是透明的(或黑色?),即使我没有这样配置。我尝试在模态视图控制器的viewDidLoad方法中手动设置导航栏的tintColor属性,但没有效果。
I have a view controller that is inside a popover, and I want to present a modal view controller from it. Here's my code:
EditDateViewController *dateViewController = [[EditDateViewController alloc] initWithNibName:@"EditDateViewController" bundle:[NSBundle mainBundle]];
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:dateViewController];
navController.modalPresentationStyle = UIModalPresentationCurrentContext;
[self presentModalViewController:navController animated:YES];
[dateViewController release];
[navController release];
The result is this:
alt text http://cl.ly/5300e4f8f5d440d3f850/content
For some reason, the navigation bar background is transparent (or black?) even though I did not configure it that way. I tried manually setting the tintColor
property of the navigation bar in the viewDidLoad
method of the modal view controller, but it had no effect.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
试试这个
Try this