Recommended way to test for iOS Version specific feature at runtime
I'm targetting IOS 4.3 and 5.0 with an app built against the 5.0 SDK and would like to add support for the Twitter functionality introduced in iOS5 only when the app runs on a iOS5 device. What is the recommended way to reliably test for the availability of these OS features at runtime without having your app crash? I know you do this using respondsToSelector in Objective-C but how is it done in C#? With recent MonoTouch versions you can use the following code: if (UIDevice.CurrentDevice.CheckSystemVersion (5, 0)) { window.RootViewController = navigation; } else { window.AddSubview (navigation