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.