iOS 导航栏navigation的translucent属性 影响半透明状态

来源:互联网 发布:北京 室内 篮球场 知乎 编辑:程序博客网 时间:2024/05/19 14:38
[objc] view plain copy
 在CODE上查看代码片派生到我的代码片
  1. <pre name="code" class="objc">//适配ios7  
  2. if( ([[[UIDevice currentDevice] systemVersion] doubleValue]>=7.0)) {  
  3. //        self.edgesForExtendedLayout=UIRectEdgeNone;  
  4.     self.navigationController.navigationBar.translucent = NO;  
  5. }  

当translucent设置为NO时,效果是这样的:

[objc] view plain copy
 在CODE上查看代码片派生到我的代码片
  1. self.navigationController.navigationBar.translucent = YES;  

当translucent设置为YES时,导航栏呈现半透明效果,是这样的:



1
0 0
原创粉丝点击