我有一個的UITabBarController一個主屏幕,我想將其設置爲RootViewController的,但是當我做,我有以下錯誤的UITabBarController爲RootViewController的在MonoTouch的
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
我還設置筆尖名稱與同一XIB名文件的所有者。
這是我的項目示例。 Click Here to Download Project
的問題不是視圖控制器未設置。班級不是「兼容」的。根據日誌,問題是「這個類不是關鍵tabBarController的關鍵值編碼」。因此有一個調用來設置根視圖控制器。 –