iPhone App Development Tutorial

Here is a quick and easy iPhone App Development tutorial I hope you will enjoy! It is created using Xcode version 3.4 but will work in Xcode 4.  The only difference is the way the interface looks.  Here is an Xcode 4 Tutorial video. It covers an overview of Xcode and how an iPhone project is set up.

There is a video of this tutorial in the 5 Day Mini-course.

Yes, it is true that you can create an iPhone App graphically using the Apple SDK.  There is some code, but it is only a line or two for this tutorial.  While you may not necessarily write the code, all apps are written with code.

The application we will create in this tutorial will consist of an interface that displays an image and contains a button which performs an action of displaying text in a label when the button is clicked.  For this to occur, we need to create an interface consisting of the following objects:

  1. An image (UIImage)
  2. A label to display text (UILabel)
  3. A button that sends an action the label to display. (UIButton)

To create the application graphically without using code, you would basically create a new project in Xcode using either a template or from scratch. Then use the Interface Builder drag-n-drop to place objects onto the interface.  Once all of your objects are in place, you would then connect the objects together.  Even the actions can be created using the Interface Builder.  However, you will have to program the instructions within the action.  Interface Builder just helps you accomplish your tasks faster by pre-writing some of the code.

There will still need to be “some” tweaking of the code after it is auto-generated, but very minimal, as XCode isn’t intuitive enough to know specific functions or actions you may want your app to perform.

I’ve created a brief development tutorial of how to create a simple iPhone app using this method.  The more complex your app, the more code you need to write, which is why you need to know how to program.  Both a written and video version of the tutorial are provided.  Because of the graphics, I had to divide the tutorial into 4 parts.  Stay tuned for the video.

This tutorial assumes you already have the Apple SDK installed.  This is covered step-by-step in the mini-course.

Here is your download link: iPhone-App-Development-Tutorial

CREATE THE VISUAL INTERFACE

  1. In Xcode Select File => New Project => Window Based Application
  2. Name your project and click “Save.”  *Name is important – as it will show up under the icon for your app.
  3. In the left pane of Xcode select the Nib folder, click the drop-down arrow  and double-click the MainWindow.xib file.  It will open up Interface Builder.  You will see 4 windows open: a MainWindow.xib, Nib Window, the Inspector Window, and the Library.
  4. From the Interface Builder menu, select Tools => Library to show Library objects if it does not open and/or Select Tools => Inspector to show the Inspector window if it doesn’t open.
  5. Here we go! From the Library, Drag a “View” object onto the Nib or .xib window  (It is now a Class of type “UIView”)  Select the “Identity” tab from the “Inspector Window” and type a name the class or “View” next to the filed that says “Class.”  Make sure the view is selected in order to see it in the inspector window.
  6. Add an Action to the View by clicking the “+” button and label it “showText.
  7. Add an Outlet to the view by clicking the “+” button and label it “mainText” and give it a “Type” of “UILabel” by selecting UILabel from the dropdown.
1. Create a new Xcode Project

STEP 1 - Create a new Xcode project

iPhone App Development Tutorial - Name Your iPhone Project

STEP 2 - Name your Xcode project

STEP 3 - Select the Nib/Xib

STEP 3 - Select the Nib/Xib

add-the-view

Step 4 - Add the View

project-outlet-action

STEP 6 and 7 - Add the Outlet and the Action

Use the links below to access the remainder of the tutorial.