-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";

UITableViewCell *cell = [tableview dequeueReusableCellWithIdentifier:CellIdentifier];

if(cell == nil)
{
NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibname:@"PhotoTableCell" owner:self options:nil];
cell = [topLevelObjects objectAtIndex:0];
}

NSDIctionary *photoData = [[self appDelegate].photoArray objectAtIndex:indexPath.row];

UILabel *label;
lable = (UILabel *)[cell viewWithTag:2];
lable.text = [photoData valueForKey:@"Country"];

label = (UILabel *)[cell viewWithTag:3];
lable.text = [photoData valueForKey:@"Region"];

UIImageView *imageView= (UIImageView *)[cell viewWithTag:1];
imageView.image = [photoData valueForKey:@"Thumbnail"];

return cell;
}

'Object-C' 카테고리의 다른 글

아이폰에서 3G 인지 와이파이인지 알아보는 방법  (0) 2010.12.22
단축키  (0) 2010.12.17
NSLog  (0) 2010.12.15
adHoc  (0) 2010.12.13
category  (0) 2010.12.03

+ Recent posts