Since xcode has been upgraded to version 4.X, Chinese translation books only talk about version 3.x, so there will be some minor differences in Project Creation.
After xcode 4, the Project template does not contain window-based application. Here we can select empty application. Example.:
After setting the project name, we can see the following interface:
In this case, we need to create mainwindow. XIB. This is the interface file, which is similar to the initial main. xml file of Android.
In supporting files, create a window-type XIB named mainwindow. XIB, for example:
Okay, it's almost finished. Drag a lable from libray to the interface, and enter some text in the lable:
Finally, do not forget to set the main interface of the application as mainwindow:
Big success! Press command + S to save and click the run icon to runProgram: Of course, don't forget to select the running device as the iPhone =