Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

gryym

macrumors newbie
Original poster
Jul 14, 2008
13
0
Hi,

Instead of using labels to place the typed text in iPhone, i would like to use a TableView (UITableview). A snippet of a code to display texts on label is as follows:


self.string = textField.text;
. . .
. . .

NSString *greeting = [[NSString alloc] initWithFormat:mad:"%@!",
nameString];
label.text = greeting;
[greeting release];


Is there a similar method or code that i could follow for texts in TableView?

Thx!
 

white89gt

macrumors regular
Jan 18, 2006
133
0
UITableViews require delegate methods to display data. There are many delegate methods, but the two that you must implement are the one that tells the table how many rows it has, and the other one is the one that tells the individual cells what to display. It sounds complicated, but it actually makes a lot of sense once you get accustomed to working with objective-c. There are some video tutorials over at iphonedevcentral.org that explain how to work with UITableViews.
 

gryym

macrumors newbie
Original poster
Jul 14, 2008
13
0
I see. Alright. Its gonna take me some time to understand it but i know i will get the gist of it soon. Thanks for the help.

=)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.