码迷,mamicode.com
首页 > 其他好文 > 详细

status bar 补充更改

时间:2016-05-07 08:32:12      阅读:166      评论:0      收藏:0      [点我收藏+]

标签:

 1:statusBar字体为白色

  在plist里面设置View controller-based status bar appearance 为 <a target=_blank target="_blank" href="https://www.baidu.com/s?wd=NO&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1YLuW-buWn1nWT4uW-Bnjfk0ZwV5Hcvrjm3rH6sPfKWUMw85HfYnjn4nH6sgvPsT6KdThsqpZwYTjCEQLGCpyw9Uz4Bmy-bIi4WUvYETgN-TLwGUv3EnHbYP1D1n1fdPHn3nWTzPjfvr0" class="baidu-highlight" rel="nofollow" style="text-decoration: none; color: rgb(45, 100, 179);">NO</a>;设置statusBarStyle 为 UIStatusBarStyleLightContent

  2:设置statusBar和navigationbar为一体

  

  [nav.navigationBar setBackgroundImage:[UIImage imageNamed:@"bg_navbar.png"] forBarPosition:UIBarPositionTopAttached barMetrics:UIBarMetricsDefault];
  

  

  3:tabBarItem被选中没效果,需要调用sdk7中的方法:

  

  //兼容ios7以前

  [viewController.tabBarItem setFinishedSelectedImage:actionMenu.selectedIcon withFinishedUnselectedImage:actionMenu.icon];

  //ios7的方法

  viewController.tabBarItem.selectedImage = actionMenu.selectedIcon;
  

  4:刷新状态栏statusBar

  

  [self setNeedsStatusBarAppearanceUpdate]

  5:navigationbar上面的BarButtonItem字看不见问题,backBarItem箭头没有,则需要

  

  //ios7设置BarButtonItem字体颜色,则会显示出来,不包括返回箭头

  [[UIBarButtonItem appearance] setBackButtonTitlePositionAdjustment:UIOffsetMake(0, 0) forBarMetrics:UIBarMetricsDefault];

  //设置BarButtonItem颜色,包括返回箭头

  [[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];
  

  6:取消ios7自带手势,比如navigationcontroller的右滑返回

  

  self.navigationController.interactivePopGestureRecognizer.enabled = <a target=_blank target="_blank" href="https://www.baidu.com/s?wd=NO&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1YLuW-buWn1nWT4uW-Bnjfk0ZwV5Hcvrjm3rH6sPfKWUMw85HfYnjn4nH6sgvPsT6KdThsqpZwYTjCEQLGCpyw9Uz4Bmy-bIi4WUvYETgN-TLwGUv3EnHbYP1D1n1fdPHn3nWTzPjfvr0" class="baidu-highlight" rel="nofollow" style="text-decoration: none; color: rgb(45, 100, 179);">NO</a> ;

status bar 补充更改

标签:

原文地址:http://blog.csdn.net/flying_in_the_world/article/details/51331605

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!