Spy on the Swift series blog description and its swift version update

Source: Internet
Author: User

Swift is still up to date, with every update being updated, and some of the old versions of Swift are not applicable in new Swift, and new versions of Swift add new features. So far, Swift is version 2.1. The swift books translated last year are version 1.0, so some of these things are not applicable. Although the swift language is still being updated, its overall infrastructure has been formed, the big changes should not have, the version of the update is more of the new language features added and perfected, so do not worry about the current learning of Swift will be outdated. The update is in the original basis to update, so it is necessary to learn swift. New Swift versions introduce new concepts such as If-let,guard, Curry, custom quick help, and more.

One: Swift language version update

A number of blogs about the Swift language have been published in the past, but some of the code in the previous blog, or, more specifically, some of the syntax will not compile in the latest Xcode, due to the differences between the swift versions. But don't worry, Apple has already considered it for us, and in Xcode, with the Swift language version Update tool, the tool can update the code to the latest swift language version. Below is the step to update your SWIFT code to the latest Swift language version:

1. Click on the menu-"edit->convert->to Latest Swift Syntax ... as shown:

2. After the first step, immediately follow the prompts below and click Next:

3. Select the target you want to convert and click Next to:

4. Clicking Next will enter the transition state, and the conversion will go into the contrast state, which is particularly similar to submitting SVN using Xcode. You can see where those places have been converted. The specific results are as follows:

  Second, spy on the Swift series blog

()  spy on the different HelloWorld of Swift programming

spying on swift programming to play on the playground

spy on Swift's basic data types

spy on Swift's new addition data type tuple and optional value

to spy on Swift's different enumeration types

() spy on Swift's Strings (string)

() basic operators and advanced operators needed to spy on Swift

     (a) A glimpse of Swift's array and dictionary

(a) An example of the application of Swift's function and closure (Ten) spy on the powerful switch of Swift programming (one) to spy on Swift's distinctive struct and class spy on access to inheritance and classes like Swift (a) the use of the Swift Protocol (PROTOCOL) and principal agent (Delegate) callbacks spy on Swift using a Web browser to compile swift code and generics in Swift Blog continues to update in ...   

Spy on the Swift series blog description and its swift version update

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.