It is now possible to check the version using available from Swift2.0.
The syntax is as above,
At the end
In other words, in the example above, iOS other than the platform (WatchOS,OSX will be that it is not specified in particular with respect to, etc.).
#Abailable (Platform version, ...)
will be.At the end
*
indicates that "otherwise specified with respect to other platforms." In other words, in the example above, iOS other than the platform (WatchOS,OSX will be that it is not specified in particular with respect to, etc.).
In addition, when the processing of post-conditions specified is large, it would be good to use the guard statement because the contents of the if statement would parentheses bad increases.
Conversely, self-made method in order not to be used outside the platform version that you specify and classes
available (platform version, ...)
should be used.
Reference article
www.hackingwithswift.com
www.hackingwithswift.com
No comments:
Post a Comment