I have a class named Person and in this class is the property PersonName (amongst others).
A MutableArray MyUserInfoArr
contains many Person objects.
I want to list each PersonName in a Cell of a TableView? How do I do this? Thanks in advance.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
Person *myPerson;
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil)
{
cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
}
NSString *cellValue = [myUserInfoArr objectAtIndex:indexPath.row];
cell.text = cellValue;