0

In the use of the iphone 5, the navigationBar and statusBar normal height, but under the iphone6 or iphone6plus navigationBar and the statusBar height is bigger, not 64, the likelihood is scaling.

The problem is that I want iphone6 or iphone6plus to also become a normal 64, but they don't know how to find this code in the project. /Users/henry/Desktop/question1.jpg

lee
  • 13
  • 3

2 Answers2

1

You need to specify Launch Images for the iPhone 6 / + resolutions, either as individual image files or define a XIB / storyboard file (for iOS 8+). Otherwise your app will run in that zoomed sort of compatibility mode that you're seeing-- apple created that when they introduced the iPhone 6 & 6+ which were of different aspect ratios than any iPhones before them so apps that weren't updated for the new phones didn't look entirely awful when the new phones came out.

see: https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/LaunchImages.html

bennettk
  • 213
  • 2
  • 11
  • Is that I am currently used iphone6, enter the following code print result is like this: NSLog(@"iphone6-------------------%f,%f",[[UIScreen mainScreen] bounds].size.width,[[UIScreen mainScreen] bounds].size.height); 2015-07-27 20:25:21.583 DoNever[3735:551611] iphone6-------------------320.000000,568.000000 – lee Jul 27 '15 at 12:29
0

Try this code. make sure that image "navbg.png" height 64.

  [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
  [[UINavigationBar appearance] setShadowImage:[UIImage new]];

  [[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"navbg.png"] forBarMetrics:UIBarMetricsDefault];
  [[UINavigationBar appearance] setTranslucent:NO];
  [[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];
Avijit Nagare
  • 8,482
  • 7
  • 39
  • 68
  • Is that I am currently used iphone6, enter the following code print result is like this: NSLog(@"iphone6-------------------%f,%f",[[UIScreen mainScreen] bounds].size.width,[[UIScreen mainScreen] bounds].size.height); 2015-07-27 20:25:21.583 DoNever[3735:551611] iphone6-------------------320.000000,568.000000 – lee Jul 27 '15 at 12:32