我正在使用MonoTouch,MonoDevelop和Interface Builder编写iPad应用程序,而且我偶然发现了一个似乎无法解决的问题。这可能很简单。我试图做的是从开始强制应用程序到Landscapemode。该应用程序在Landscape中开始,但不会正确调整子视图的大小。iPad风景无法正确调整子视图的正确尺寸
基本上我在我的appdelegate中做的是我添加一个叫做IndexViewController.xib的SubView到Window。在IndexViewController中,如果我在IndexViewController中重载ShouldAutorotateToInterfaceOrientation来返回它,它会有一个带有标签的视图:它工作正常。
public override bool ShouldAutorotateToInterfaceOrientation (UIInterfaceOrientation toInterfaceOrientation)
{
return ((toInterfaceOrientation == UIInterfaceOrientation.LandscapeLeft) || (toInterfaceOrientation == UIInterfaceOrientation.LandscapeRight));
}
不过,我现在尝试创建一个NavigationController并将其添加到在初始化IndexController.xib视图:
void Initialize()
{
this.View.AddSubview (NavController.View);
}
它正确地旋转,但没有填满整个“窗口” ,我发布了截图和示例解决方案。而我的info.plist设置为允许 “UIInterfaceOrientationLandscapeLeft” 和 “UIInterfaceOrientationLandscapeLeftRight” 为UISupportedInterfaceOrientations
有可能是死的东西简约不简单,我很想念,但我无法弄清楚。
感谢您的回答,解决了我的问题:) – degborta 2011-02-07 14:46:14