美文网首页
hidesBottomBarWhenPushed代码中的使用

hidesBottomBarWhenPushed代码中的使用

作者: 代码干货 | 来源:发表于2015-11-22 19:30 被阅读205次

如何才能用代码实现如下效果:

滑动动画.gif

使用storyboad的方法我就不多说了大家可以参考如下文章:

代码和xib实现如下:
方法1:
<pre>
ViewController2 *vc = [[ViewController2 alloc] init];
vc.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:vc animated:YES];
</pre>
方法2;
<pre>
self.hidesBottomBarWhenPushed = YES;
ViewController3 *vc = [[ViewController3 alloc] initWithNibName:@"ViewController3" bundle:nil];
[self.navigationController pushViewController:vc animated:YES];
self.hidesBottomBarWhenPushed = NO;
</pre>

参考文章:
iOS:hidesBottomBarWhenPushed的正确用法
iOS跳转界面时隐藏tabBar的方法:hidesBottomBarWhenPushed

相关文章

网友评论

      本文标题:hidesBottomBarWhenPushed代码中的使用

      本文链接:https://www.haomeiwen.com/subject/jzcrhttx.html