Showing posts with label UITableViewController. Show all posts
Showing posts with label UITableViewController. Show all posts

Thursday, May 5, 2011

iPhone Programming Tutorial – UITableView Hello World

In this tutorial I will walk to you through creating a simple “Hello World” application using a UITableView for the iPhone.  There are many ways that a Hello World program could be made on the iPhone, I am going to show you the simplest.  This tutorial assumes you have a basic understanding of Objective-C.  Apple has provided a very simple and straight forward tutorial on Objective-C.  You can find it here.
You will learn how to:
This tutorial assumes that you have already installed the iPhone SDK.  If you are unsure how to do this, click and follow the steps.

simple Navigationbased tutorial

It’s time to start displaying some drinks. You’ll need to make some modifications to both the RootViewController.h and RootViewController.m files

1Declare the drinks array.(in RootViewController.h )

@interface RootViewController : UITableViewController{
NSMutableArray* drinks;
}
@property (nonatomic, retain) NSMutableArray* drinks;
@end
(RootViewController.m)

@synthesize drinks;
-(void)dealloc{

[drinks release];

[super dealloc];

}