美文网首页
tableview image 的大小

tableview image 的大小

作者: AlexLi_ | 来源:发表于2016-06-10 14:40 被阅读33次

http://blog.csdn.net/lengshengren/article/details/25327481

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 image 的大小

      本文链接:https://www.haomeiwen.com/subject/htysdttx.html