Thursday, April 9, 2009

Your First iPhone/iPod Touch Application...


Are you ready to make your first application? Well lets go!


First off I need you to start up Xcode. You will be using Xcode for all of your projects.

Next click on File and then New Project.



Make sure your in the iPhone OS templates and choose View Based Application. In later tutorials I will show you how to use others but for now View Based Application it is.


Name your new project MyApp and save it where ever you want.

Once you have Xcode opened up make sure the Active SDK is set to simulator and then hit Build & Go.




The iPhone Simulator should run and start your app. Doesn't look like much but don't worry we will get to that. Now go back into Xcode.

Since this is your first app I will make it easy and use no code. Instead open up MyAppViewController.xib located on the side under the resources folder.

Interface Builder is where you build your applications interface. Our interface will just be a label saying "My name is (your name here)". To do this click on Tools >> Library and look for the label.



Drag this Label on your View and position it how you like. Then rename it (by double clicking it) "My Name is (your name here)".


To make our app look really nice click on the background of the view and click up top on Tools >> Attributes Inspector. When Attributes inspector comes up click on background and change it to yellow.



Your almost done. Save Interface Builder and go back to Xcode. Hit that Build & Go button one more time. Yeah! Your first iPhone app. It should look something like this...



If you have any questions feel free to comment.

Stay Tuned beacuse the next tutorial is on its way. Tutorial #2 will allow you to type your name in a textfield then on the tap of a button a message will appear saying "Hey (your name here)".


No comments:

Post a Comment