您的位置:首页 > 其它

presentViewController显示方式的窗口,没有导航栏的解决方法

2016-10-17 19:50 633 查看
ViewController *Controller = [[ViewController alloc] init];
[self presentViewController:Controller animated:YES completion:nil];

怎么看怎么觉得代码没啥问题,搜索了半天发现应该采用如下方式,对Controller进行转换

ViewController *Controller = [[ViewController alloc] init];
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:Controller];
[self presentViewController:nav animated:YES completion:nil];

这样就OK啦
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: