歡迎加入QQ討論群258996829
Swift 頭像
蘋果5袋
5
Swift

蘋果正式發(fā)布 Swift 3.0

發(fā)布時間:2016-09-14 11:19  回復:0  查看:3983   最后回復:2016-09-14 11:19  

美國時間2016年9月13日,蘋果公司正式發(fā)布了Swift 3.0,并同時發(fā)布了相應的開發(fā)工具Xcode 8。

Swift 3.0 下載地址:https://swift.org/download/#releases

蘋果正式發(fā)布 Swift 3.0

Swift 3.0 更新內容:

  • Updated for Swift 3.0.

  • Updated the discussion of functions in the Functions chapter and theFunction Declaration section to note that all parameters get an argument label by default.

  • Updated the discussion of operators in the Advanced Operatorschapter, now that you implement them as type methods instead of as global functions.

  • Added information about the open and fileprivate access-level modifiers to the Access Control chapter.

  • Updated the discussion of inout in the Function Declaration section to note that it appears in front of a parameter’s type instead of in front of a parameter’s name.

  • Updated the discussion of the @noescape and @autoclosureattributes in the Escaping Closures and Autoclosures sections and the Attributes chapter now that they are type attributes, rather than declaration attributes.

  • Added information about operator precedence groups to thePrecedence for Custom Infix Operators section of the Advanced Operators chapter, and to the Precedence Group Declarationsection of the Declarations chapter.

  • Updated discussion throughout to use macOS instead of OS X,Error instead of ErrorProtocol, and protocol names such asExpressibleByStringLiteral instead ofStringLiteralConvertible.

  • Updated the discussion in the Generic Where Clauses section of theGenerics chapter and in the Generic Parameters and Argumentschapter, now that generic where clauses are written at the end of a declaration.

  • Updated the discussion in the Escaping Closures section, now that closures are nonescaping by default.

  • Updated the discussion in the Optional Binding section of the The Basics chapter and the While Statement section of the Statementschapter, now that if, while, and guard statements use a comma-separated list of conditions without where clauses.

  • Added information about switch cases that have multiple patterns to the Switch section of the Control Flow chapter and the Switch Statement section of the Statements chapter.

  • Updated the discussion of function types in the Function Typesection now that function argument labels are no longer part of a function’s type.

  • Updated the discussion of protocol composition types in the Protocol Composition section of the Protocols chapter and in the Protocol Composition Type section of the Types chapter to use the newProtocol1 & Protocol2 syntax.

  • Updated the discussion in the Dynamic Type Expression section to use the new type(of:) syntax for dynamic type expressions.

  • Updated the discussion of line control statements to use the#sourceLocation(file:line:) syntax in the Line Control Statementsection.

  • Updated the discussion in Functions that Never Return to use the new Never type.

  • Added information about playground literals to the Literal Expressionsection.

  • Updated the discussion in the In-Out Parameters section to note that only nonescaping closures can capture in-out parameters.

  • Updated the discussion about default parameters in the Default Parameter Values section, now that they can’t be reordered in function calls.

  • Updated attribute arguments to use a colon in the Attributes chapter.

  • Added information about throwing an error inside the catch block of a rethrowing function to the Rethrowing Functions and Methodssection.

  • Added information about accessing the selector of an Objective-C property’s getter or setter to the Selector Expression section.

  • Added information to the Type Alias Declaration section about generic type aliases and using type aliases inside of protocols.

  • Updated the discussion of function types in the Function Typesection to note that parentheses around the parameter types are required.

  • Updated the Attributes chapter to note that the @IBAction,@IBOutlet, and @NSManaged attributes imply the @objc attribute.

  • Added information about the @GKInspectable attribute to theDeclaration Attributes section.

  • Updated the discussion of optional protocol requirements in theOptional Protocol Requirements section to clarify that they are used only in code that interoperates with Objective-C.

  • Removed the discussion of explicitly using let in function parameters from the Function Declaration section.

  • Removed the discussion of the Boolean protocol from theStatements chapter, now that the protocol has been removed from the Swift standard library.

  • Corrected the discussion of the @NSApplicationMain attribute in theDeclaration Attributes section.


您還未登錄,請先登錄

熱門帖子

最新帖子

?