应用程序认为它运行在3.5英寸的iPhone,当它在4英寸 [英] App thinks its running on 3.5 inch iPhone when it is on 4 inch
问题描述
我正在为3.5和4英寸的屏幕开发应用程序。但是,突然在模拟器上,屏幕尺寸变成了320 * 480,即使我正在运行4英寸的iPhone模拟器。
我把它放在AppDelegate文件,它打印320.000000, 480.000000 ...
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
NSLog(@%f,%f,[[UIScreen mainScreen] bounds] .size.width,[[UIScreen mainScreen] bounds] .size.height);
...
}
在Xcode(如果有)的设置,我不小心碰到使它像这样。所有我的.xib文件设置为4英寸视网膜。
请检查您的iPhone 4inches项目中是否有Default-h568文件。 p>
I am developing app for both 3.5 and 4 inch screens. However, suddenly on the simulator the screen size became 320 * 480 even when I am running 4-inch iPhone simulator.
I put this in AppDelegate file and it printed 320.000000, 480.000000...
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
NSLog(@"%f, %f", [[UIScreen mainScreen] bounds].size.width, [[UIScreen mainScreen] bounds].size.height);
...
}
I'm not sure which setting in Xcode (if any) that I accidentally touched that made it like this. All my .xib files are set to 4-inch retina. Does anyone came across this before?
Please check that you have Default-h568 file in the project for iPhone 4inches.
这篇关于应用程序认为它运行在3.5英寸的iPhone,当它在4英寸的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!