我想知道为什么 UIScreen.MainScreen.Bounds 是 480 x 320,而屏幕模式是 940 x 680。如何设置正确的分辨率,因为我想针对 iPhone5。我已将模拟器设置为 iPhone 5。
我的屏幕看起来不像我想要的,我需要测试 iPhone 5 的分辨率。
我在哪里可以获得正确的界限,或者为什么界限不是应该的?
这是我的 appdelegate 代码
public override bool FinishedLaunching (UIApplication app, NSDictionary options)
{
// create a new window instance based on the screen size
window = new UIWindow (UIScreen.MainScreen.Bounds);
StartScreen homeScreen = new StartScreen();
//add home screen to navgation controller
// becomes the top most screen
this.rootNavigationController = new UINavigationController();
this.rootNavigationController.NavigationBarHidden = true;
this.rootNavigationController.PushViewController(homeScreen, false);
// set the root view controller on the window. the nav controller witll handle the rest
this.window.RootViewController = this.rootNavigationController;
// If you have defined a view, add it here:
// window.AddSubview (navigationController.View);
// make the window visible
window.MakeKeyAndVisible();
return true;
}