Sometimes there are features added in new versions of iOS that are tempting to use, but you don't want to prevent users on older devices from using the app just because of one minor feature.
I've just added UIRefreshControl
to an app, which was added in iOS 6. I don't really care enough to use a 3rd party solution (of which there are a number), I'd just like to not invoke the code that sets it up if I'm running on an older device. I suspect, being a static language, this isn't possible, but I thought I'd ask and see if there are ways of achieving this.
Obviously if I was just sharing the code I could do this with preprocessor macros, but I need to build the app to execute on iOS 5.1 + iOS 6.0.