How does one compare the value of a switch state? I have a switch that I need to use an if/else statement on whether it is enabled (on) or not (off).
Thanks in advance.
see this post - http://www.vicberggren.com/blog/handling-the-uiswitch-valuechanged-event/
The On property:http://developer.apple.com/library/ios/documentation/uikit/reference/UISwitch_Class/Reference/Reference.html#//apple_ref/occ/instp/UISwitch/on
If you cannot find the info in the Xamarin reference docs, just look at the corresponding Apple docs.
Thanks guys, I think I've got it understood now.
Once this app is done, I think I'll learn Objective-C so that I can at least know what corresponds to what in Xamarin.
No need to go quite that far Although a basic sense of how Objective C functions and maps to C# is certainly very helpful. This document is also helpful there.
The most important thing probably is to get a bit cozy with the Apple Cocoatouch frameworks documentation. This will likely always be more extensive and up-to-date than the corresponding Xamarin docs, and most any class/member/etc you encounter there should exist on the Monotouch side, with either the same or a very similar (more C-Sharpish) name. But do have a look at the binding document I linked to above - this explains more about the rationale behind some things appearing differently.
Xamarin Inc., as a wholly-owned Microsoft subsidiary acting as a separate legal entity, adheres to the Microsoft Privacy Statement: Privacy & cookies