我想知道为什么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;
}