having trouble finding documentation showing how to utilize an object's properties to set the text label for a cell within UITableView's cellForRowAtIndexPath method:
Any help straightening out this total noob is appreciated!
Code:
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"UITableViewCell"];
if(cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"UITableViewCell"] autorelease];
}
//a temporary representation of a class object from an array
tempObj = [[ItemEntry alloc] init];
tempObj = [entries objectAtIndex:[indexPath row]];
//this doesn't work and i'm not sure why...
[[cell textLabel] setText:[tempObj.entryName]];
[tempObj release];
tempObj = nil;
return cell;
}