Sunday, January 25, 2009
at
1:41 PM
|
I finally was able to create my first working application! Whenever anyone starts a new programming language the first program they inevitably create is Hello World. So that's what we're going to do.
To start off, first open up XCode and close the welcome screen that pops up. Then select File-->New Project and select Window-Based Application. You will be greeted with the XCode IDE. There are some files in there that contain some code and stuff. I'm not quite sure what a lot of that means yet but I'm sure I'll figure it out as I go along. The file of interest is MainWindow.xib. This seems to be the main window of the application. Double clicking this file opens the Interface Builder where we can design a user interface.
What we want to do is go to the Tools menu and select Library. There are a lot of user interface objects that are here. For this simple program all we need is a label. Go the library and find Label and drag one out to the window. Then double click on the label and type "Hello World." Save your work at this point. Now go back into XCode and hit Build and Go at the top of the screen. The IPhone simulator should pop up and you should see "Hello World" pop up in the window. Congratulations! We just made our first application! Now it's time to find something more fun to do.
To start off, first open up XCode and close the welcome screen that pops up. Then select File-->New Project and select Window-Based Application. You will be greeted with the XCode IDE. There are some files in there that contain some code and stuff. I'm not quite sure what a lot of that means yet but I'm sure I'll figure it out as I go along. The file of interest is MainWindow.xib. This seems to be the main window of the application. Double clicking this file opens the Interface Builder where we can design a user interface.
What we want to do is go to the Tools menu and select Library. There are a lot of user interface objects that are here. For this simple program all we need is a label. Go the library and find Label and drag one out to the window. Then double click on the label and type "Hello World." Save your work at this point. Now go back into XCode and hit Build and Go at the top of the screen. The IPhone simulator should pop up and you should see "Hello World" pop up in the window. Congratulations! We just made our first application! Now it's time to find something more fun to do.
Posted by
JP
0 comments:
Post a Comment