在表视图中为每个单元格添加不同的图标

Chr*_*ina 2 iphone xcode cocoa-touch uitableview ipad

我想在我的应用程序中的表视图中添加不同的图标.任何人都可以通过正确的数组引导我,或者如果可能的话显示一些示例代码或示例.任何帮助将不胜感激.

谢谢,克里斯蒂

Aru*_*nGJ 10

说图标存储为icon0.png,icon1.png等.你可以给每个单元格的图标

cell.imageView.image = [UIImage imageNamed:    
              [NSString stringWithFormat:@"icon%d.png",indexPath.row]];
Run Code Online (Sandbox Code Playgroud)