【发布时间】:2016-05-03 04:12:00
【问题描述】:
我正在使用 Xamarin 运行 2015 Visual Studio。当我启动 iOS 模拟器时,它在模拟器上显示黑屏。我正在使用带有导航控制器的故事板。
- 我已将主界面设置为我的故事板。
- 尺寸等级 - 任意/任意
- 我已重启模拟器,运行“重置内容和设置”
AppDelegate 代码(仅包含内容的方法。):
public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
{
// create a new window instance based on the screen size
Window = new UIWindow(UIScreen.MainScreen.Bounds);
// If you have defined a root view controller, set it here:
Window.RootViewController = new Controllers.RegistrationController();
// make the window visible
Window.MakeKeyAndVisible();
return true;
}
【问题讨论】:
-
你也可以添加你的 AppDelegate 代码吗?你也可以尝试在 Appdelegate 中设置一个断点来验证它是否被调用。
-
上面添加的代码,这就是所有的代码。
-
FinishedLaunching 被调用了吗?
-
这种情况只发生在 vs 上吗?你试过在 Mac 上使用 xamarin studio 吗?
-
你是说启动模拟器是app还是模拟器?
标签: ios visual-studio xamarin