固定cell.imageView.image的大小

来源:互联网 发布:win10系统优化设置 编辑:程序博客网 时间:2024/05/28 05:15
 

ios tableview 那些事(二十四) 固定cell.imageView.image的大小

分类: Ios tableview 109人阅读 评论(0) 收藏 举报
ios

    cell.imageView.image = [UIImage imageNamed:[imageArray objectAtIndex:[indexPath row]]];

    

  

    CGSize itemSize = CGSizeMake(6050);


    UIGraphicsBeginImageContext(itemSize);


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


    [cell.imageView.image drawInRect:imageRect];


    cell.imageView.image = UIGraphicsGetImageFromCurrentImageContext();

    UIGraphicsEndImageContext();

0 0
原创粉丝点击