I\'m working on an iOS app. It currently only works on iOS 4 since I use the following method on several occasions: \"UIGraphicsBeginImageContextWithOptions\". This method i
UIGraphicsBeginImageContextWithOptions is a C function, so you can't use Objective-C methods like -respondsToSelector: to test its existence.
You could, however, weak link the UIKit framework, and then check if UIGraphicsBeginImageContextWithOptions is NULL:
if (UIGraphicsBeginImageContextWithOptions != NULL) {
UIGraphicsBeginImageContextWithOptions(...);
} else {
UIGraphicsBeginImageContext(...);
}