An Absolute Beginner's Guide to iPhone Development

Skill

An Absolute Beginner's Guide to iPhone Development

Posted in:

So you've got a Mac, you've got an iPhone, and you really want to start writing some apps. There's tons of documentation available, but the best way to learn a new language and framework is to simply dive right in. All of the documentation and tutorials I ran across when learning to program the iPhone depended a little too much on Interface Builder, which basically sticks a layer of magic between me and what I want to do. Frankly, I like to begin at the bottom and work my way up, which is why this tutorial is going to show you how to create a basic 'Hello World' application programmatically - without the help of a visual designer.

When I pick up any new framework that includes a designer, I like to start out building interfaces in code, because then I get an understanding of what the designer is doing behind the scenes. And honestly, I find Interface Builder about one of the most confusing designers I've ever used.

The first thing you're going to need to do is download and install the iPhone SDK. This is going to give you everything you need in order to build apps - XCode, iPhone Simulator, and Interface Builder. Downloading and installing the SDK is totally free. You'll have to pay $99 if you want to run the app on a real iPhone or distribute it to the app store. For the purposes of learning, though, the simulator works just fine.

After you've got all that stuff installed, you're ready to start. Start by launching XCode. By default it's installed in the Developer folder.

Developer Folder

When you launch XCode you'll be presented with a welcome screen. You can either look through that or just dismiss it, none of it is particularly important. What we need is a new project. Select File > New Project to bring up the project templates.

XCode New Project Window

The Window-Based Application is about as simple as it gets. What this template is going to give is a Window and an application delegate. An application delegate (UIApplicationDelegate) is an object that responds to messages from a UIApplication object. There can be only one UIApplication object, and the project template takes care of creating it for us. When you click Choose, you'll now be prompted for a project name. I named mine "HelloWorld".

Project Name

Once the project is created, you'll be presented with the XCode interface and all of the files the project template has generated for you.

Basic XCode Interface

The important files are main.m, HelloWorldAppDelegate.h, and HelloWorldAppDelegate.m. The main function is where the single UIApplication object is created. The function call UIApplicationMain() takes care of that. You might be wondering, though, how in the world is HelloWorldAppDelegate hooked up to the UIApplication object? Well, unfortunately there's still a little magic we can't avoid. The template created a nib file for us (MainWindow.xib) that takes care of forming this relationship. You'll just have to take it for granted that the messages will be passed into our delegate.

Now let's check out the implementation of the delegate, HelloWorldAppDelegate.m. There are several messages we can get from the UIApplication object, however the template has already created the one we care about - applicationDidFinishLaunching

- (void)applicationDidFinishLaunching:(UIApplication *)application {    

    // Override point for customization after application launch
    [window makeKeyAndVisible];
}

This function is where we'll be creating our view controller, which will eventually hold our 'Hello World' label object. In order to create a view controller, we need to add another class to our project that subclasses UIViewController. Fortunately, since creating view controllers is a common task, XCode has a template for it. Right mouse click on the Classes folder and choose Add > New File.

XCode New File Window

When you click Next, you'll be presented with some options. The only thing you should have to set is the filename. I named mine HelloWorldViewController. You might notice that the new implementation file (HelloWorldViewController.m) is full of commented out functions. View controllers are meant to be used by overriding the base implementation of various methods. In our case, we want to override loadView, which is used to manually populate a view controller.

// Implement loadView to create a view hierarchy programmatically,
// without using a nib.
- (void)loadView {
       
}

We're getting there. We're almost ready to starting putting something on the screen. You don't add controls directly to the view controller. They're added to a UIView, which is a property of the view controller. The view, however, is not allocated yet, so we're going to start there. We need to create a UIView object that is the size of our display and set it to the view controllers view property.

- (void)loadView {
       
  //create a frame that sets the bounds of the view
  CGRect frame = CGRectMake(0, 0, 320, 480);
       
  //allocate the view
  self.view = [[UIView alloc] initWithFrame:frame];
       
  //set the view's background color
  self.view.backgroundColor = [UIColor whiteColor];
}

The first thing I do is create a CGRect object that will act as the bounds for our view. Basically I want the view positioned at (0, 0) and be the total size of the iPhone display (320, 480). View controllers have a view property that needs to be set to our new UIView object. The last thing I do is simply set the background color property to white.

All right, now we can actually create a label to hold our "Hello World" text.

- (void)loadView {
       
  //create a frame that sets the bounds of the view
  CGRect frame = CGRectMake(0, 0, 320, 480);
       
  //allocate the view
  self.view = [[UIView alloc] initWithFrame:frame];
       
  //set the view's background color
  self.view.backgroundColor = [UIColor whiteColor];
       
  //set the position of the label
  frame = CGRectMake(100, 170, 100, 50);
 
  //allocate the label
  UILabel *label = [[UILabel alloc] initWithFrame:frame];
 
  //set the label's text
  label.text = @"Hello World!";
 
  //add the label to the view
  [self.view addSubview:label];
 
  //release the label
  [label release];
}

Again, I need to specify where I'd like the label to be, so I create another CGRect object. I then allocate the label and initialize it with the bounds I just created. Next up I set the text to "Hello World!" and add the label to the view. Objective-C uses reference counting to automatically delete objects, so whenever you're done with a reference, you need to call release.

We now have a view controller with a label that will display the text, "Hello World". Now we need to create an instance of this view controller and add it to our application. Remember that function, applicationDidFinishLaunching that I mentioned earlier. That's where we'll be creating our view controller.

The first thing you're going to have to do it add an import statement at the top of that file (HelloWorldAppDelegate.m) so the compiler can find the declaration of that object.

#import "HelloWorldAppDelegate.h"
#import "HelloWorldViewController.h"

Just add it right under the existing import statement. Now we're ready to create the view controller.

- (void)applicationDidFinishLaunching:(UIApplication *)application {    
 
  //allocate the view controller
  self.viewController = [HelloWorldViewController alloc];
 
  //add the view controller's view to the window
  [window addSubview:self.viewController.view];
 
  [window makeKeyAndVisible];
}

Just like before, we simply allocate a new HelloWorldViewController. We don't add the view controller directly to the window, rather we add it's view property to the window. Technically we could create the view controller locally, but doing so would cause a memory leak. We need to save a reference to it somewhere so we can clean up the memory at a later time. I created a property called viewController to store the view controller.

Properties are defined in the .h file. Here's my modified HelloWorldAppDelegate.h file.

#import <UIKit/UIKit.h>

@class HelloWorldViewController;

@interface HelloWorldAppDelegate : NSObject <UIApplicationDelegate> {
    UIWindow *window;
 
  HelloWorldViewController *viewController;
 
}

@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) HelloWorldViewController *viewController;

@end

The @class HelloWorldViewController is a forward declaration. Basically we're telling the compiler a class with this name exists, but you don't need to worry about its definition right now. In the @interface section, we declare a member variable to hold our view controller. Lastly, we use @property to wrap our member variable with implicit get and set functions.

We're almost done. We now need to tell the compiler to actually create the get and set functions for our new property. We do that back in the .m file with @synthesize.

@synthesize window;
@synthesize viewController;

You should already see one for the window property. Just stick this one right underneath it. The very last thing we need to do is release our reference to the view controller when the dealloc is called. There should already be a dealloc function in the .m file. We just need to add a little to it.

- (void)dealloc {
  [viewController release];
  [window release];
  [super dealloc];
}

And there you have it. The final HelloWorldAppDelegate implementation file should look like this:

#import "HelloWorldAppDelegate.h"
#import "HelloWorldViewController.h"

@implementation HelloWorldAppDelegate

@synthesize window;
@synthesize viewController;


- (void)applicationDidFinishLaunching:(UIApplication *)application {    
 
  //allocate the view controller
  self.viewController = [HelloWorldViewController alloc];
 
  //add the view controller's view to the window
  [window addSubview:self.viewController.view];
 
  [window makeKeyAndVisible];
}


- (void)dealloc {
  [viewController release];
  [window release];
  [super dealloc];
}

@end

We're done. If you build and run the app (Build > Build and Go), you should see something that looks like the image below.

iPhone Hello World Screenshot

And there you have it. You've learned how to build a simple iPhone application entirely in code. The iPhone is a new platform for us, so as we learn we'll continue to post new tutorials. If you've got questions, feel free to post them below or leave them in our Forums.

Want to learn more? Check out these great iOS programming books:

Jon
04/21/2009 - 01:05

Hi I like your tutorial. There aren’t enough that show you how to make a GUI programmatically. I read another tutorial that told me how to make dragable subviews. So I put the 2 together, but unfortunately the label wont display I think [view addSubview:label]; is the problem. The dragable subviews work.

 
// HelloWorldDragView.h
@interface HelloWorldDragView : UIImageView
{
   CGPoint startLocation;
}
@end

// HelloWorldDragView.m
@implementation HelloWorldDragView
- (void)loadView
{
       
  //create a frame that sets the bounds of the view
  CGRect frame = CGRectMake(0, 0, 320, 480);
       
  //allocate the view
  self.view = [[UIView alloc] initWithFrame:frame];
       
  //set the view's background color
  self.view.backgroundColor = [UIColor whiteColor];
       
  //set the position of the label
  frame = CGRectMake(100, 170, 100, 50);
 
  //allocate the label
  UILabel *label = [[UILabel alloc] initWithFrame:frame];
 
  //set the label's text
  label.text = @"Hello World!";
 
  //add the label to the view
  ////////*********/////////
  // [self.view addSubview:label]; this generates a compile time error view isn't reconized
  [self addSubview:label];
  ////////*********/////////

  //release the label
  [label release];
}

- (void) touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event
{
   CGPoint pt = [[touches anyObject] locationInView:self];
   startLocation = pt;
   [[self superview] bringSubviewToFront:self];
}
 
- (void) touchesMoved:(NSSet*)touches withEvent:(UIEvent*)event
{
   CGPoint pt = [[touches anyObject] locationInView:self];
   CGRect frame = [self frame];
   frame.origin.x += pt.x - startLocation.x;
   frame.origin.y += pt.y - startLocation.y;
   [self setFrame:frame];
}
@end

and the main viewController
the main view controller makes the main view and adds the subviews addove to it's view

 
@interface HelloController : UIViewController
{
    UIView *contentView;
}
@end

@implementation HelloController
CGPoint randomPoint()
{
   return CGPointMake(random() % 256, random() % 396);
}

- (void)loadView
{
   //this makes the outter view
   CGRect apprect = [[UIScreen mainScreen] applicationFrame];
   contentView = [[UIView alloc] initWithFrame:apprect];
   contentView.backgroundColor = [UIColor whiteColor];
   self.view = contentView;
   [contentView release];
   
   //this creates and adds 10 subviews to the view
   for (int i = 0; i < 10; i++)
   {
      CGRect dragRect = CGRectMake(0.0f, 0.0f, 30.0f, 30.0f);
      dragRect.origin = randomPoint();
      HelloWorldDragView *dragger = [[HelloWorldDragView alloc] initWithFrame:dragRect];
      [dragger setUserInteractionEnabled:YES];
      dragger.backgroundColor = [UIColor redColor];
      [contentView addSubview:dragger];
      [dragger release];
   {

}

reply

md
05/20/2011 - 01:12

hi i am new to iphone programming and this section helps me a lot but i need more explainaion like what is an iboutlet and how to create buttons and navigate them to oter pages

reply

Anonymous
04/28/2009 - 22:44

Hi - great tutorial!

Do I need MAC for iPhone apps development or can I do it on PC?

reply

The Reddest
04/29/2009 - 09:16

At the moment, I believe the only straight forward way to write iPhone apps is to own a Mac. Here's a story about writing them on Windows, but it requires you to jailbrake the phone, which means you won't be able to add apps to the app store. Really, you just need OSX and XCode, so any computer you can install OSX on will probably work.

reply

Anonymous
04/04/2011 - 01:57

reddest .. ok. i tried to install mac ios and Xcode on simple machine and get successes. it working well but still there is one Problem with this is that that machine is not detect the lane card . means not connected with the internet,.
is there any alternate for this?

reply

Anonymous
04/05/2011 - 23:37

its possible that OSX doesn't have the correct drivers for the particular LAN card you are using. seeing as OSX always runs on 'MAC-certified' hardware I don't know how you'd go about getting proper drivers to install. not being a mac user i can't help you there

reply

Anonymous
11/14/2011 - 15:12

There is something called DragonfireSDK that let's windows programmers build game apps. It relays C or C++ code into objective C functions as you code. My app is already on the app store.

reply

msk
01/25/2011 - 08:31

surely you need mac without you cant

reply

rahulvyas
04/29/2009 - 06:11

plz tell me that how do add a button in this programm and handle his touchUpinside event

reply

The Reddest
04/29/2009 - 09:19

That's probably more code that I'd like to stick in a comment. I'll add it to my list of tutorials to write, so keep checking back.

reply

The Reddest
05/27/2009 - 17:16

I created a new tutorial specifically for this.

reply

MattjDrake
04/30/2009 - 14:40

Great post for beginning iPhone developers. The biggest hurdle to get over when doing this is really getting your feet wet. Then getting into the Apple developer mindset. I have been blogging about this while offering programming tips as well over at http://howtomakeiphoneapps.com if you are interested in joining the conversation.

reply

Joe
05/27/2009 - 17:06

I have been coding for 10 years and your tutorial is the only one that makes sense. So simple, no gui tools, just code. Well done!

reply

Mark
06/12/2009 - 08:57

This is by far the best tutorial on this matter. The technique of relying just on code is so much more insightful and intuitive than frigging around with the dark arts of IB. More tutorials likes like this please!

Any chance of a code only tutorial on developing a simple nav app with a detail view, on which you can load the contents of formatted text from a local file?

Thanks to the author.

reply


06/29/2009 - 14:01

Thanks for the tutorial! It is very helpful.

reply

Arijeet
10/21/2009 - 10:27

Do i have to own a iphone to check the program i/o or Just a PC will do.

reply

The Reddest
10/21/2009 - 14:41

You do not need an iPhone to write applications. You will need a Mac with X-Code and the iPhone SDK installed.

reply

Pradosh
05/26/2011 - 18:25

Can we use iPod instead? I was thinking about accelerometer apps for which I guess would need an actual device?

reply

The Reddest
05/27/2011 - 09:11

Yes, the iPod Touch will work.

reply

Arijeet
10/21/2009 - 10:29

FYI
I am very new to this development. Please Help me.

reply

Anonymous
03/04/2010 - 13:59

I tried this and I got a compile error on line :
[window addSubview:self.viewController.view];

the error is:
error:request for member 'view' in something not a structure or union

reply

The Reddest
03/04/2010 - 15:50

Sounds like it doesn't know what viewController is. Do you have it as a member on the class?

@interface HelloWorldAppDelegate : NSObject <UIApplicationDelegate> {
    UIWindow *window;
 
  HelloWorldViewController *viewController;
 
}

reply

Sergey
09/24/2010 - 01:57

I have it. Still the same error message. The whole code of the HelloWorldAppDelegate.h:

#import

@class HelloWorldViewController;

@interface HelloWorldAppDelegate : NSObject {
UIWindow *window;

HelloWorldViewController *viewController;
}

@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) HelloWorldViewController *viewController;

@end

reply

The Reddest
09/24/2010 - 08:52

Did you import HelloWorldViewController.h at the top of the .m file?

reply

ivarrand
03/05/2010 - 15:33

Great Tutorial simple and straight forward. I would like you to amplify the meaning of self. Is self a property of viewController? I am having problem understanding the use of self.

reply

Anonymous
04/02/2010 - 11:59

My experience level = novice.

I beat my head against this for a while, but I can't see where I went wrong. Compilation error is this:

HelloWorld/Classes/HelloWorldViewController.m:12: fatal error: method definition not in @implementation context
compilation terminated.
{standard input}:34:FATAL:.abort detected. Assembly stopping.

HelloWorldAppDelegate.h

#import <UIKit/UIKit.h>

@class HelloWorldViewController;

@interface HelloWorldAppDelegate : NSObject <UIApplicationDelegate> {
    UIWindow *window;
       
        HelloWorldViewController *viewController;
       
}

@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) HelloWorldViewController *viewController;

@end

HelloWorldAppDelegate.m

#import "HelloWorldAppDelegate.h"
#import "HelloWorldViewController.h"

@implementation HelloWorldAppDelegate;

@synthesize window;
@synthesize viewController;

- (void)applicationDidFinishLaunching:(UIApplication *)application {
       
        //allocate the view controller
        self.viewController = [HelloWorldViewController alloc];
       
        //add the view controller's view to the window
        [window addSubview:self.viewController.view];
       
    // Override point for customization after application launch
    [window makeKeyAndVisible];
}

- (void)dealloc {
        [viewController release];
    [window release];
    [super dealloc];
}

@end

HelloWorldViewController.h

#import <UIKit/UIKit.h>

@interface HelloWorldViewController : UIViewController {

}

@end

HelloWorldViewController.m

-  (void)loadView {
       
        //create a frame that sets the bounds of the view
        CGRect frame = CGRectMake(0, 0, 320, 480);
       
        //allocate the view
        self.view = [[UIView alloc] initWithFrame:frame];
       
        //set the view's background color
        self.view.backgroundColor = [UIColor magentaColor];
       
        //set the position of the label
        frame = CGRectMake(100, 170, 100, 50);
       
        //allocate the label
        UILabel *label = [[UILabel alloc] initWithFrame:frame];
       
        //set the label's text
        label.text = @"Hello World!";
       
        //add the label to the view
        [self.view addSubview:label];
       
        //release the label
        [label release];
}

reply

tinku99
04/04/2010 - 20:46

Thanks for the nice tutorial.

I would add a few hints on using xcode.
For example:
1. option + double click on symbols to get documentation
2. command + double click to jump to definition of symbol
3. shift + command + f to search within the project

2 questions:
I don't understand why you [release label].
Doesn't the view need it ?
Does addSubView make a copy of it ?
Also, what's the point of reference counting if you still to manually release the label, and the viewController ?

reply

chris
04/05/2010 - 19:27

hi. im new to this.
i am having problems creating this helloworld app

i did everything is indicated
but i keep getting errors

please contact me in msn messenger or email..

thank you in advance

Chris_9454@hotmail.com

reply

Anonymous
05/09/2010 - 12:38

hi
how can i have another view called from the windows based app when i click on a button on the view.

i am able to get the first view loaded and button displayed. it shows the alert but am looking for the second view to be loaded. any help is appreciated.

reply

lakshman
05/21/2010 - 13:53

i have added an label to my iphone view controller ,what about my code segment ,is there any change in my code when we r dragged label in it .

reply

lakshman
05/21/2010 - 13:58

any freemac os is available in net

reply

Anonymous222
07/14/2010 - 08:45

Perfect, it builded up from 2nd try (i made few syntax errors). As it's an starter project can't be simpler and clear more than that. Although removing the main window nib would give an extra "touch" as an real "code" primer. Keep up with the good work !

reply

harry.bourke
10/17/2010 - 02:09

Hi, I am just beginning to the code view controller rather then a .xib file, whenever I do this, it always comes up with warnings, could I just have the whool code for the:
appdelegate.m
appdelegate.h
viewcontroller.m
viewcontroller.h

And I will read over it.

Thanks

reply

The Fattest
10/18/2010 - 08:46

At the bottom of the post there is a link to the entire iOS project, also here is a link to it too. Source Files

reply

fivosv
11/15/2010 - 23:15

Thanks for this great introductory tutorial!
I code for 25 years (mostly on C/C++) and
I think this "GUI by code" approach is
the most appropriate for me, to understand
the essentials of xCode and iOS.

For people asking if they can run the
tutorial in a Windows PC (without a Mac or an iPhone):
You can try to install Mac OS/X Snow Leopard 10.6.4 + xCode & iOS SDK into Sun Virtual Box 3.2 (you can run
Sun Virtual Box in a Windows XP or Windows 7 PC).

The only limitation I found (after many attempts in at least 3-4 older PCs) is that your PC must have at least a Dual Core processor and you motherboard/CPU combination
must support VT-x (Hardware Virtualization), otherwise you will not be able to setup the Snow Leopard into Virtual Machine.

Related links:
(a) You can setup Sun Virtual Box as described here:
http://www.sysprobs.com/mac-os-guest-virtualbox-326-snow-leopard-1064-windows-7-32-bit

(b) Proceed with Snow Leopard installation as described here:
[/php]http://tonymacx86.blogspot.com/2010/04/iboot-multibeast-install-mac-os-x-on.html[/php]

Regards
and thanks again for the great tutorial

reply

Matt
12/29/2010 - 01:09

Hi Guys,

Really appreciate the quick tutorial.
It is great for us not using OSX to have some screenshots of xcode etc and you show us the template files as you have done

Keep up the good work

Matt

reply

Gopinathan
01/04/2011 - 05:10

Very useful at the initial stage..

reply

RCBhai
01/05/2011 - 16:08

This is Excellent Tutorial. Please continue with more like this. Thanks

reply

thirupathi
01/10/2011 - 01:55

Hi,
Yours beginners tutorial is excellent.can u help me for below doubt.
How can i create ebook app for iPhone ,Can u send me step by step process for this email:
thirupathi.vemula@gmail.com

reply

Anonymous
09/07/2011 - 09:29

I would love to know if you got a responce. I am trying to make an ebook also. Any help you could give me would be great!

rebecca@outofourmindsstudios.com

reply

Anonymous
01/27/2011 - 00:55

Hi,
Nice one ... Can u plz help me for my doubt . I have an iphone application to enter name and then it goes to server then it come back and print it in to the iphone. can u plz give me the solution for this .

kukku11@ymail.com

BR,
Chithra

reply

Anonymous
08/09/2011 - 07:29

ys its possible

reply

Murali
02/09/2011 - 11:47

Hi,

I am java developer.I am interested in iphone apps development.Could you plz suggest reference books and best language to do app development.

reply me if you have chance to 123.meeting@gmail.com

reply

Anonymous
02/18/2011 - 18:12

Hi,

Is it possible that,i want to pick the content from database (SqlServer2005) for my Iphone application,If yes please guide me for this.

reply

Anonymous
08/09/2011 - 07:27

No its not possible

reply

dougb
03/13/2011 - 21:51

My version of Xcode 4.2 does not show the classes folder. Is there a way to import this folder?

reply

Anonymous
03/17/2011 - 18:08

Hi how can i use the asp.net web service in the Iphone application.

please guide me how can i use the asp.net webservice in iphone application.

reply

yeoj
04/03/2011 - 08:00

This tutorial is so comprehensive and complete, following feels like you're the one doing it in my own iPhone.

reply

Jinx1983
04/06/2011 - 19:45

I'm new to the Xcode and iPhone app development and have not had any previous experience with code writing. My question is where does all the code in this tutorial get written in the code that already comes up on the Xcode program on my imac

reply

Anonymous
04/17/2011 - 17:51

Don't you need to call some sort of init function when adding the view controller to App delegate?

- (void)applicationDidFinishLaunching:(UIApplication *)application {

//allocate the view controller
// Does it need to be initialized as well/ or not?
self.viewController = [HelloWorldViewController alloc];

reply

The Reddest
04/18/2011 - 08:37

Yes, it should have been initialized. My view controller didn't have any initialization logic, which is why it worked, but it's good practice to call init.

reply

grantchan
04/18/2011 - 22:27

i haven't seen you call [view release] before the viewcontroller dealloc? is it memory leak?

reply

The Reddest
04/19/2011 - 08:37

I'm assigning directly to the view controller's view property. We are not responsible for cleaning that up. The base view controller class will call release on that property when it's dealloc'd.

reply

Anonymous
04/20/2011 - 05:34

Thank you Reddest for this nice tutorial.

Much appreciated.

What would make it even better for me is if you wrote the name of the file above each segment of codes you write.

For i.e.,

From the HelloWorldAppDelegate.m and then put the codes

Thanks again for this great tutorial

reply

The Reddest
04/20/2011 - 07:53

That's a really good suggestion. I'll remember that for future tutorials.

reply

Anonymous
04/20/2011 - 05:44

I was able to create my first view.

So now I have a first view with the Label "Hello World".

Great! Now how do I create a second view ? By that I mean on a iPhone you simply click a small arrow on the top right corner to move to the next screen or perhaps you have a button to click to go to the second view.

I assume that all the codes for that second view will be written in the same files in the same project.

Thanks a lot.

TOTALLY NEWBIE

reply

The Reddest
04/20/2011 - 07:55

A lot of iPhone apps use the UINavigationController class. This is the thing that puts the arrows at the top of the screen and 'slides' views back and forth.

Unfortunately this is a pretty difficult control to use, and we don't have any tutorials here. You'll just have to rely on Google to help you out.

reply

Anonymous
04/25/2011 - 15:50

Hi,

I created an iphone login application.After success of login i open a Uitableview of users.But in the tableview i am not able to see the navigation bar.I tried a lot but i didn't get success.

Thanks in Advance

reply

BigSte
05/26/2011 - 00:26

What do you have to do to get you app onto your phone instead of just running it in the iOS Simulator.
I'm not interested in making a fortune on the App Store but I would like to see my coding efforts running on an actual iPhone.

reply

The Reddest
05/26/2011 - 09:02

You have to join the iOS developer program ($99/year). Once you're signed up, go to the iOS Provisioning Portal. The instructions are a little long to put here, but Apple's documentation in the provisioning portal is pretty good.

reply

BigSte
05/26/2011 - 12:41

oof !!
I was hoping you wouldn't say that :-(
Do they do a Student Discount?

reply

The Reddest
05/26/2011 - 14:45

No, unfortunately I don't think they do.

reply

wissam
06/08/2011 - 09:00

hi reddest ,
am enjoying reading ur tutorials , and am really interested in iphone programming, i bought a used PowerMAC G5 with Mac OS X version 10.5.8 ,also i installed iphone SDK 3.1.3 with xcode 3.1.4 for leopard and i cant find the iphone os templates when i try to open a new projects ... do u have any idea what should i do ?? your help is really appreciated .

reply

Anonymous
06/22/2011 - 18:40

its $99 to download the kit now!

reply

Anonymous
06/28/2011 - 07:07

Can i know in similar way how can i create an array of buttons

reply

Johnny8718
07/19/2011 - 13:17

Being brand new to this, can anyone tell me why I shouldnt use the App Creators on the net?

reply

Shubham
07/24/2011 - 08:04

Hey,

I earlier today, used the tutorial with Interface Builder. Later, I googled your article and this was a complete basic guide. Thanks I built my first Hello World Application without using IB. :)

reply

SantoshC
08/01/2011 - 20:18

Thank you for detailed example!!

reply

Anonymous
08/07/2011 - 06:13

Reminds me strongly of the code in "iPhone Developer's Cookbook Sample Code"

reply

IphoneLover
09/02/2011 - 17:48

Very nice. Thank you for motivating me to learn more.

reply

Broomy
09/18/2011 - 05:13

hi

I am completely new, and i mean completely, i've never touched development before on any scale. I am running mac os 10.7.1 lion and Xcode 4.1.1, this tutorial needs updating because this is all gibberish with the new layout!

reply

YKumar
10/03/2011 - 06:41

Hi All, I want to understand how I can add tabs to XCode framework so that Library, Inspector, Resource views etc are laid in diff tabs unlike they showing scattered. It make it difficult to work with switching to many screens. Any pointers will be appriciated.

reply

Rookie
10/09/2011 - 14:55

Hi all, I have ZERO background or skill in programming anything more complex than a multi-use remote control, and tryign to teach myself how to build an iphone app. Following the instructions above, and working on iOS 10.6.6 (if that matters), I get to the point where I click to create the "UIViewControllerSubclass" file, and I end up with 4 "issues" of the same variety: lines that "HelloWorldView Controllercannot use super because it is a root class."

If anyone is still looking at this thread, have any advice?

Thanks much!

reply

Davdav
10/27/2011 - 00:40

Thanks alot for your tutorial..

reply

Anonymous
11/06/2011 - 14:48

does not work at all errorrs errorrs and all codes are copy paste in right files?????????^%$#*&^%$

reply

RI_tutorials
11/12/2011 - 05:52

There have been a lot of changes with XCode updating to version 4.2. I tried following online tutorials but changes in memory management and storyboarding means even the easy tutorials found online may now produce errors. I uploaded some basic tutorials to help people into the new version, currently two "Hello World" apps, one using a UIViewController and the other using a UITableViewController. They do not help you with writing Objective-C, rather just an introduction to the new XCode layout. Find them at www.robinsonsintelligence.com.

reply

AwesomeInTraining
11/17/2011 - 13:50

Thank you so much for this! I have lots of ideas for iPhone Apps, not so much the skills for it. This was useful. Also, for anyone else out there who is non-techie, (like me), I found this guide extremely helpful. It's basically a step-by-step guide created by an app developed who also doesn't have a background in engineering. Hope it helps!

Create iPhone Apps That Rock: A Guide for Non-Technical Folks.
http://www.amazon.com/Create-iPhone-Apps-That-ebook/dp/B005YWWUEI/ref=ntt_at_ep_dpt_1

reply

asmaa
11/19/2011 - 21:51

oh very complex why all this files and code for two words >>.
there no more simple ??

reply

Anonymous
12/08/2011 - 21:28

Nope. You should not be coding iPhone Apps if you think this is hard.

reply

Digish
12/21/2011 - 05:46

I am new to this. can u provide me some link where I can download tutorial for this.

reply

VeryNovice
01/01/2012 - 18:30

Has anyone been able to get this to work in Xcode 4.2 iOS 5.0.1? If so, can you please share your changes?

thanks
VeryNovice

reply

VeryNovice
01/02/2012 - 21:29

I got this to work in Xcode 4.2, iOS 5.0.1 by using the IB and connecting the MainWindow to ViewController view. It works great!

reply

JungleFaceJake
01/10/2012 - 18:08

Hi, how do I create a project for this in Xcode 4.2.1 ? The options are different....

reply

Anonymous
01/20/2012 - 01:51

so be it .. here I have begun on my first iphone web-app and this very page was the first place that inspirited me. Here I came again to drop this note after I completed my ‘tour’ on iPhone development site, just having ourselves accepted there.

good site, good effort.

Rooby G
kiranatama.com

reply

Cameron Reid
02/03/2012 - 22:43

Thanks for the post. Here’s a tool the lets you create your apps in minutes, without coding. Just Point-and-Click http://www.caspio.com/online-database

reply

Lory
02/04/2012 - 07:34

Thank you for this great tutorial! So far I have used online apps builder to make aphone apps withoud code, but after reading your tutorial, I'll try to create mobile apps myself.

reply

Add Comment

Put code snippets inside language tags:
[language] [/language]

Examples:
[javascript] [/javascript]
[actionscript] [/actionscript]
[csharp] [/csharp]

See here for supported languages.

Javascript must be enabled to submit anonymous comments - or you can login.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.