iOS-UITableViewCell cellForRowAtIndexPath

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{

    static NSString *CellIdentifier = @"Item1_Cell";

    CustomTabBarItem1Cell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];

    if(cell == nil){

        cell = [[CustomTabBarItem1Cellalloc] init];

    }

    int row = [indexPath row];

    cell.labelClass.text = [arrayClassobjectAtIndex:row];

    cell.labelDesc.text = [arrayDescobjectAtIndex:row];

    cell.image.image = [UIImageimageNamed:[arrayImageobjectAtIndex:row]];

    return cell;

}
posted @ 2012-08-31 15:43  TQ.CH  阅读(148)  评论(0编辑  收藏  举报