tableView的中cell添加图像

来源:互联网 发布:web前端开发的软件 编辑:程序博客网 时间:2024/05/17 11:07

  在    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ }  这个函数中添加以下代码:

//---display an image-----    UIImage *image = [UIImage imageNamed:@"one.jpg"];    cell.imageView.image = image;

搞定。