First impressions of Swift Playground for cats and cats (1)

Source: Internet
Author: User

First impressions of Swift Playground for cats and cats (1)
Playground introduction to creating Playground

Open xcode, select the first one, and then click Next to create a Demo of the Playground exercise code.

The page that appears after the application is created is divided into several areas in our Playground. 1: code area. 2: preview area

The code written in the code area can be viewed directly in the preview area. Of course, the display time of this effect depends on the Compilation Time of the machine. Simply put, if you are using the latest version of the 15-inch MPO top configuration with a small 20 thousand configuration, it is basically as smooth as silk. If you are using a simulator to open a black apple, it would be worse than shit... Just like this, let's look at chrysanthemum.

Here I use Swift to initialize a Button
When the compilation is complete, the preview is okay.

Playground Preview

Then I set the frame and its background color for this btn so that we can see him. In addition, playground has many useful small functions. The rightmost eye click will pop up a window to show the preview effect. After clicking the white point on the right of the eye, it will become a plus sign, and some preview effects will be added to the bottom of the Code.

Playground Console

Swift loop, where the console opens

Supplement

We can write a playground demo set by ourselves, which can be opened at this position or press the shortcut key command + 0.

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.