我有一个带有 UITabBarController 的 HomeScreen,我想将其设置为 RootViewController,但是当我这样做时出现以下错误
MonoTouch.Foundation.MonoTouchException has been thrown:
Objective-C exception thrown. Name: NSUnknownKeyException Reason: [<UIApplication 0xc82d330> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key tabBarController.
MonoTouch.Foundation.MonoTouchException: Objective-C exception thrown. Name: NSUnknownKeyException Reason: [<UIApplication 0xc82d330> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key tabBarController.
at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
at MonoTouch.UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0004c] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:38
at Test.Application.Main (System.String[] args) [0x00000] in /Users/merqurio/Projects/Test/Test/Main.cs:17
我还将 Nib Name 设置为与 File's Owner 相同的 XIB 名称。
这是我的项目示例。点击这里下载项目