2012-12-28 43 views

回答

0

sample tutorial可能会有所帮助。其中一种方法是扩展UITableViewCell类并为自定义单元格使用自定义.XIB。那么,这是一般的想法。

+0

我以前看过这个教程,但被制作在制作演示文件误。但是这次它工作。谢谢 – user1417638

0

试试下面的代码

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

    static NSString *CellIdentifier = @"MyCellIdentifier"; 



    SPHTableCell *cell = (SPHTableCell *)[data_Table dequeueReusableCellWithIdentifier:CellIdentifier]; 
    if (cell == nil) { 
     cell = [[SPHTableCell alloc] initWithStyle:UITableViewCellStyleDefault 
               reuseIdentifier:CellIdentifier]; 
    } 

    return cell; 
} 
相关问题