In #41 Checking if Newer APIs Are Available In Older iOS Versions, I describe how to check if an API is available in the user's iOS version, using Objective-C. This technique is very useful for switching to alternate implementations or disabling features when your app is running on older iOS versions, yet let you take advantage of newer iOS features (and hardware).

In Swift 2.0, there's an easier and more specific way to detect iOS versions, by using #available. For example, if you want to check if the device supports 3D Touch, but want to support iOS versions earlier than 9.0, you can do this: