Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
var a = new UISwitch();
a.OnImage = new UIImage();
MonoTouch.Foundation.MonoTouchException: Objective-C exception thrown. Name: NSInvalidArgumentException Reason: -[UISwitch setOnImage:]: unrecognized selector sent to instance 0xf5d5440
at at (wrapper managed-to-native) MonoTouch.ObjCRuntime.Messaging:void_objc_msgSend_IntPtr (intptr,intptr,intptr)
at MonoTouch.UIKit.UISwitch.set_OnImage (MonoTouch.UIKit.UIImage value) [0x00021] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UISwitch.g.cs:278
at Moments.Views.Autorize.SplashView.ViewDidAppear (Boolean animated) [0x00006] in /Users/mobile/Projects/msn/msn_client/Moments/Views/Autorize/SplashView.cs:74
at 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 Moments.Application.Main (System.String args) [0x00000] in /Users/mobile/Projects/msn/msn_client/Moments/Main.cs:17
OnImage is only available in iOS 6.0 or later - which version are you running on?
My (colleague) bad. Thank you. It was iOS 5.