ios - The imageView has been obstructing by navigationItem -
i found sample code.
it show view next code in appdelegate.m
- (bool)application:(uiapplication *)application didfinishlaunchingwithoptions:(nsdictionary *)launchoptions { self.window = [[uiwindow alloc] initwithframe:[[uiscreen mainscreen] bounds]]; // override point customization after application launch. uilocalnotification *notification = [launchoptions objectforkey:uiapplicationlaunchoptionslocalnotificationkey]; if (notification) { nslog(@"appdelegate didfinishlaunchingwithoptions"); application.applicationiconbadgenumber = 0; } aitpreviewviewcontroller *previewviewcontroller = [[aitpreviewviewcontroller alloc] initwithnibname:@"aitpreviewviewcontroller" bundle:nil]; navigationcontroller = [[uinavigationcontroller alloc]initwithrootviewcontroller:previewviewcontroller]; [self.window setrootviewcontroller:navigationcontroller] ; self.window.backgroundcolor = [uicolor whitecolor]; [self.window makekeyandvisible]; homecoming yes; }
the next image in aitpreviewviewcontroller.xib
.
but view not normal when run on iphone , show next picture.
the three imageview
on top has been obstructing navigationitem
but when turn other view , , utilize next code turn back.
uiviewcontroller *previewer = [[aitpreviewviewcontroller alloc] initwithnibname:@"aitpreviewviewcontroller" bundle:nil] ; previewer.edgesforextendedlayout = uirectedgenone; [self.navigationcontroller pushviewcontroller:previewer animated:yes];
it show normal view next picture.
the view show not normal @ first time... happened status ?
can utilize auto-layout
solve problem ?
if don't want hide navigation bar in xib create little alter
just alter top bar property none shown in image. auto place image below navigation bar
ios objective-c
No comments:
Post a Comment