2012-03-01 38 views
1

我有一行代碼:以上OS 4.3.5的iPad的MonoTouch:在IOS 4.3.1無法識別的選擇iPad的

this.NavigationItem.LeftBarButtonItems = new UIBarButtonItem[] { btnRefresh,btnCalculator}; 

工作正常,但OS 4.3.5拋出這個奇怪的錯誤了「一些」我的用戶。我無法複製,但曾多次向我報告:

[UINavigationItem setLeftBarButtonItems:]: unrecognized selector sent to instance 0x86bf20 
UIKitApplication:com.ianvink.ref.goldsilver[0x99bd][121] 
Unhandled Exception: MonoTouch.Foundation.MonoTouchException: 
Objective-C exception thrown. Name: NSInvalidArgumentException 
Reason: -[UINavigationItem setLeftBarButtonItems:]: unrecognized selector sent to instance 0x86bf20 

UIKitApplication:com.ianvink.ref.goldsilver[0x99bd][121] <Notice>: 
at MonoTouch.UIKit.UINavigationItem.set_LeftBarButtonItems 
(MonoTouch.UIKit.UIBarButtonItem[] value) [0x00000] in <filename unknown>:0 

在這種情況下是否有解決方法?

回答

4

此屬性(所述的ObjectiveC selector要準確)在IOS 5.0溶液。它在早期的iOS版本中不起作用。

您可以回退到LeftBarButtonItem,其中限於1個按鈕,自iOS 2.0起可用。

相關問題