- (NSInteger) numberOfSectionsInTableView: (UITableView *) tableView
{
возврат 1;
}
- (NSInteger) tableView: (UITableView *) tableView numberOfRowsInSection: (NSInteger) раздел
{
return [количество табличных массивов];
}
- (UITableViewCell *) tableView: (UITableView *) tableView cellForRowAtIndexPath: (NSIndexPath *) indexPath
{
NSString * CellIdentifer = [NSString stringWithFormat: @ "% i", indexPath.row];
UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier: CellIdentifer];
если (ячейка == ноль) {
cell = [self myCustomCell: CellIdentifer dicToSet: [tblArray objectAtIndex: indexPath.row]];
[cell setAccessoryType: UITableViewCellAccessoryDisclosureIndicator];
}
возвратная ячейка;
}
- (UITableViewCell *) myCustomCell: (NSString *) CellIdentifer dicToSet: (NSDictionary *) dicToSet
{
UITableViewCell * cell = [[[UITableViewCell alloc] initWithFrame: CGRectMake (0, 0, 320, 44).
UIImageView *imgV=[[UIImageView alloc] initWithFrame:CGRectMake(2, 2, 40, 40)];
[imgV setImage:[UIImage imageNamed:[dicToSet valueForKey:@"Photo"]]];
[cell addSubview:imgV];
[imgV release];
return cell;
}