IOS7导航栏与状态栏融合适配方法之一

ios7导航栏和状态栏现在都归于导航栏,因此导航栏高度增加40px,也就变成了128px,那么就判断系统版本,具体方法:

  float version = [[[UIDevice currentDevice] systemVersion] floatValue];
    if(version>=7.0) {
               [self.navigationBar setBackgroundImage:LOADIMAGE(@"test", @"png") forBarPosition:UIBarPositionTopAttached barMetrics:UIBarMetricsDefault];
    }

其中test.png为高度为128px的图片

posted @ 2013-11-19 15:09  MyAppZone7797  阅读(327)  评论(0编辑  收藏  举报