ios TableView cell的布局

  cell.imageView.image = [UIImage imageNamed:[imageArray objectAtIndex:[indexPath row]]];
   
 
    CGSize itemSize = CGSizeMake(60, 50);

    UIGraphicsBeginImageContext(itemSize);

    CGRect imageRect = CGRectMake(0.0, 0.0, itemSize.width, itemSize.height);

    [cell.imageView.image drawInRect:imageRect];

    cell.imageView.image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();

你可能感兴趣的:(tableview)