Home > Mobile >  Official documentation of #available?
Official documentation of #available?

Time:12-08

I googled all over the place. I just can't find the official page on https://developer.apple.com discussing #available in detail.

CodePudding user response:

Apple won't have documentation for #available since this is a language (Swift) feature.

Here it is: https://docs.swift.org/swift-book/ReferenceManual/Statements.html#grammar_availability-condition

In addition people confuse an attribute @available (can only be used in declaration) with the keyword #available (can only be used in a condition to perform a run-time check). They are not the same thing!

  • Related