当我调用此行时:
((UIImagePickerController)sender).DismissViewController (true, () => {});
我得到这个错误。请帮忙
MonoTouch.Foundation.MonoTouchException: Objective-C exception thrown. Name: NSInvalidArgumentException Reason: -[UIImagePickerController dismissViewControllerAnimated:completion:]: unrecognized selector sent to instance 0xb647ed0
at (wrapper managed-to-native) MonoTouch.ObjCRuntime.Messaging:void_objc_msgSend_bool_IntPtr (intptr,intptr,bool,intptr)
at MonoTouch.UIKit.UIViewController.DismissViewController (Boolean animated, MonoTouch.Foundation.NSAction completionHandler) [0x00036] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIViewController.g.cs:678
at ECPIInstructorObservationForm.Section1.Handle_FinishedPickingMedia (System.Object sender, MonoTouch.UIKit.UIImagePickerMediaPickedEventArgs e) [0x00142] in /Users/kjohnson/Projects/ECPIInstructorObservationForm/ECPIInstructorObservationForm/Section1.cs:298
at MonoTouch.UIKit.UIImagePickerController+_UIImagePickerControllerDelegate.FinishedPickingMedia (MonoTouch.UIKit.UIImagePickerController picker, MonoTouch.Foundation.NSDictionary info) [0x00014] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIImagePickerController.g.cs:601
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 ECPIInstructorObservationForm.Application.Main (System.String[] args) [0x00000] in /Users/kjohnson/Projects/ECPIInstructorObservationForm/ECPIInstructorObservationForm/Main.cs:17