似乎无法解决这个问题。请帮忙。我认为代码不言自明。CreateThumnail 是一个单独的类,我想与它联系,但无法真正弄清楚如何。大概是个简单的任务……
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"messageCell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
// Configure the cell...
UIImage *bigImage = [UIImage imageNamed:@"myimage.jpg"];
CreateThumbnail *place = [[CreateThumbnail alloc]init];
UIImage *thumb = [bigImage [place makeThumbnailOfSize:CGSizeMake(50,50)]];
cell.imageView.image = thumb;
cell.textLabel.text = @"First Lastname";
cell.detailTextLabel.text = @"Message, blabla";
return cell;
}
所以 - 问题在于这两行:
CreateThumbnail *place = [[CreateThumbnail alloc]init];
UIImage *thumb = [bigImage [place makeThumbnailOfSize:CGSizeMake(50,50)]];