1

Can't seem to solve this. Please help. I think the code speaks for itself. CreateThumnail is a separate class and I wanna connect with it and can't really figure out how. Probably an easy task...

- (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;
}

So - the problem lies with in these two rows:

CreateThumbnail *place = [[CreateThumbnail alloc]init];
UIImage *thumb = [bigImage [place makeThumbnailOfSize:CGSizeMake(50,50)]];
rmaddy
  • 314,917
  • 42
  • 532
  • 579
Rhyder
  • 101
  • 2
  • 14
  • You haven't indicated what you expected to happen, and what actually happened. Was thumbnail nil? The wrong size? – Jasper Blues Nov 02 '13 at 03:33
  • What does [place makeThumbnailOfSize:CGSizeMake(50,50)] return? This line doesn't seem to make sense: UIImage *thumb = [bigImage [place makeThumbnailOfSize:CGSizeMake(50,50)]]; . . . does it compile? – Jasper Blues Nov 02 '13 at 03:36
  • I get an error on UIImage *thumb = [bigImage [place makeThumbnailOfSize:CGSizeMake(50,50)]]; I wanna send a function (make makeThumbnailOfSize) with a variable (CGSizeMake(50,50)) to the class CreateThumbnail. In return comes a thumbnail of my image. So my problem is that I don't know how to write that row. – Rhyder Nov 03 '13 at 20:37
  • The code I try to follow is [this](http://stackoverflow.com/questions/1055495/uitableviewcells-imageview-fit-to-40x40), but instead I got my function in another class. – Rhyder Nov 03 '13 at 20:54
  • ...And really the only reason that I do it in another class is because I can't get the extension-file to work like they say it will. – Rhyder Nov 03 '13 at 21:06

0 Answers0