xcode5 - Navigation bar is pushed down in iOS7 -
i compiling app ios 6.1 sdk , deploying in ios7 device. app's device set iphone only.
i have view controller add navigation controller.
self.window.rootviewcontroller = [[uinavigationcontroller alloc] initwithrootviewcontroller: [[myviewcontroller alloc] init]];
when deploy app in ipad mini running ios 7, there strange gap shown @ top.
if set app's device universal, gap goes away. there explanation this? thanks.
the few changes should take care of in ios 7:-
1) navigation bar of ios 7 of dimension :- 320 x 64 while ios 6 :- 320 x 44.
2) navigation bar translucent property yes default in ios 7 set no, status bar included in ios 7.
take care of these things , go fine.
// sample code of setting navigation controller , image programatically in ios 7
self.navigationcontroller.navigationbar.translucent=no; [self.navigationcontroller setnavigationbarhidden:no animated:yes]; uiimage *backgrdnavimage=[uiimage imagenamed:@"abc.jpg"]; [self.navigationcontroller.navigationbar setbackgroundimage:backgrdnavimage forbarmetrics:uibarmetricsdefault];
Comments
Post a Comment