Possible Duplicate:
How to check iOS version?
I’m building an app that has an SMS composer (which isn’t available in 3.0).
How can I find the underlying device’s OS version dynamically and make the SMS option available, and if not disable the function?
I think you could use
NSClassFromString(@"MFMessageComposeViewController")to see if the class is available.(Caveat: You couldn’t check for
UIGestureRecognizerthis way because Apple used private class with the same name. Same could be true forMFMessageComposeViewController.)