我设置了单元格的默认图标后,我想将默认图标更改为小截图。屏幕截图我从一台服务器上逐渐变成了一台服务器,我正在从这些服务器上创建UIImage。 我的问题是,我不知道如何改变具体细胞中的accessoryView。在桌面视图中逐个更改accessoryView
我从代码周期是在这里:
// after I got a bytmap with the screenshot
UIImage *imageCopy = [ImageHelper convertBitmapRGBA8ToUIImage:newBitmap withWidth:width withHeight:height];
UIImageView *imageView = [[UIImageView alloc] initWithImage:imageCopy];
UITableViewCell *myCell = [self.tableView cellForRowAtIndexPath:(NSIndexPath *) i];
myCell.accessoryView = imageView;
[imageView release];
问题是,我认为,随着行:
UITableViewCell *myCell = [self.tableView cellForRowAtIndexPath:(NSIndexPath *) i];
应用在符合问题 – gbaor 2011-04-07 11:47:25
崩溃是你我一个int?你不能投一个int到NSIndexPath – 2011-04-07 11:55:09
NSLog NSIndexPath和MyCell的值。它看起来像一个不好的参考/零问题。 – 2011-04-07 11:56:28