Swift Language writing iOS development first program Hello world!

Source: Internet
Author: User

To be honest: the first swift statement of iOS was not the code to knock out, I didn't even have to look at the code, Hello World came out .....

I development environment: Mac OSX 10.10 DP1 + xcode6 beta + swift (lower Xcode does not support Swift language)

The idea and the approximate process:

1, set up the project, the project contains interface files, code files and so on

2. Add the text control to the project's interface file to display the Hello World

3. Enter Hello World, simulate run

Let's take a step-by-step:

1, set up the project, the project contains interface files, code files and so on

Click File-new-project to create the project

2, select the project type we choose single View application

3. Configure the project to select Swift language

4, click Next to select the project code and other file storage location

Store in my document, click on the creat button

5, after the successful creation in the left view to expand the project file, see a Main.storyboard, this is the interface control view file, used to design the software interface, we clicked (double-click will be the panel as a separate window display, not easy to add controls):

6, click Main.storyboard after display:

7. Select the third button in the lower right corner panel to get a list of controls such as Red notes

After selecting the button below is the list of controls, scroll down to find the text control, pull into the window

9, then click on the text box, enter Fuck Swift, click on the upper left corner of the run button to compile and run (compilation takes a short time):

10. Result diagram

Because this program is too simple, so the whole process is no code what things ....

Play a small ad: I am proficient in the installation and maintenance of various operating systems, including in the ordinary PC (Lenovo Acer, etc.) installed Mac OS X system (there are a lot of software), 100 yuan/time price, Welcome to Beijing Friends Consulting qq1752209254

Interested in SMS first consultation: 18510222924

PS: Support multi-system installation, that is, you can choose which operating system to enter on boot (win+linux various versions +mac OS X)

This tutorial is a black Apple machine.

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.