【发布时间】:2014-01-28 19:02:13
【问题描述】:
我有一个为 iOS7 编写的应用程序......
我的 AppDelegate 中有以下代码
[Register ("AppDelegate")]
public partial class AppDelegate : UIApplicationDelegate
{
// class-level declarations
UIWindow window;
UINavigationController navigationController;
HomeViewController_iPhone homeViewController;
public override bool FinishedLaunching (UIApplication app, NSDictionary options)
{
window = new UIWindow (UIScreen.MainScreen.Bounds);
homeViewController = new HomeViewController_iPhone ();
navigationController = new UINavigationController (homeViewController);
window.RootViewController = navigationController;
window.MakeKeyAndVisible ();
return true;
}
}
在这条线上失败了
navigationController = new UINavigationController (homeViewController);
HomeViewController 是一个 UINavigationController 类...
我在构建代码时收到以下错误 MonoTouch.Foundation.MonoTouchException 已被抛出。 抛出 Objective-C 异常。名称 NSInvalidArgumentException 原因:不支持推送导航控制器。
有什么想法吗?
【问题讨论】:
标签: c# uinavigationcontroller xamarin.ios xamarin pushviewcontroller