I want to use Xcode 9 to add iOS 11 code to my project while keeping the option to compile the project with Xcode 8 which only supports iOS 10.
In Objective-C I can do t
If you want to put the condition outside of the function, you could do it like below.
@available(iOS 11.0, *) func functionName() { // function contents }