首页 > 其他 > 详细

UINavigation push 于 present到另一个页面详解

时间:2016-04-14 11:53:52      阅读:146      评论:0      收藏:0      [点我收藏+]

如果页面中没有导航栏,可以present到这个A页面,在A页面想要跳转到有个有导航栏的页面就需要添加给B页面添加一个UINavigationController 然后present到B页面,代码如下 

 ChatViewController *cvc = [[ChatViewController alloc]init];

  UINavigationController *navi=[[UINavigationController alloc] initWithRootViewController:cvc];

  [self presentViewController:navi animated:YES completion:nil];

 

还有一种方法是push到该页面把导航栏给隐藏 在A页面将要出来的时候,self.navigationgBar.hidden = YES;

页面跳转之前self.navigationgBar.hidden = NO;push跳转

UINavigation push 于 present到另一个页面详解

原文:http://www.cnblogs.com/qiutangfengmian/p/5390211.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!