I have a dream of becoming an iOS developer ... Rookie, the usual, everything starts from HelloWorld.
IOS8 accompanied by the Iphone6/6plus, Xcode6 with the iOS8, the speed of Apple replacement is still very fast, from hardware to software, each update means that developers are faced with a time and again the evil, of course, like me as a self-motivation to become an iOS development rookie people, I don't have to worry about these problems at the moment, I just need to focus on my Hello World applet, just like I've been on other platforms countless times before.
First open Xcode and select the single view application template from the template to proceed to the next step
Follow the prompts in next to enter our project name-certainly Hello World, and the file location saved by the project file, continue next to the project development editing interface, the file tree on the left is as follows
APPDELEGATE.H/.M is to create project selected template after the system-generated Program agent processing part, to what is "agent", has not become a rookie of course I am not clear, I now understand is to deal with the program initialization of the operation of Things VIEWCONTROLLER.H/.M is the main work-processing module in Hello World, and my program functions are implemented in them; Main.storyboard is a canvas that is used to design the interface of the program. Mages.xcassets used to set the program Start icon, program interface, etc. launchscreen.xib this seems to be the system to automatically default generated boot screen.
Start editing the interface, this time I play a little bit of tricks, I no longer just drag a label to write a Hello world, a little interaction will appear richer, will let me go to the rookie road faster
Five buttons, each button will pop up a alert tells you which one you pressed before. After the layout is good to each button is a iboutlet, here to say, why to give button to build iboutlet because I want to use different buttons to display different message prompts, so need to have interaction, need to get specific press which button, In this case, the button must be declared as Iboutlet, and then define the action method to be triggered when a button is clicked
First determine which button is clicked, and then display it according to the specific situation. The last action needed is to connect this defined method to the space on our interface, so that when you click on the trigger event on the interface, the controller will viewcontroller know which method to call specifically. Control button click the individual button buttons to drag to the ViewController.h header file when you drag the mouse to the ButtonClick method appears when the rectangle box release the mouse that establishes the corresponding relationship, you can run the program!
As has not become a rookie, I found that the technology blog is really difficult to write, but for the rookie dream I will persist!
[Rookie growth Kee]ios Development Self-study note 01-Tribute to HelloWorld