我必须尝试横向的 iPad 应用程序,所以 info.plist 中的一些更改是
AppDelegate.m
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
self.window.backgroundColor = [UIColor whiteColor];
[self.window makeKeyAndVisible];
CGRect screenBound = [[UIScreen mainScreen] bounds];
NSLog(@"screenBound:%@",NSStringFromCGRect(screenBound));
return YES;
}
然后我从 CGRect 得到屏幕分辨率是 screenBound:{{0, 0}, {768, 1024}} 但我想要 {{0, 0}, {1024, 768}},怎么做?请帮我
提前致谢