How to manage UIImageView content mode?

后端 未结 7 2093
萌比男神i
萌比男神i 2020-11-29 03:16

I have an UIImageView with some fixed rect size. But my images are not fixed in size. I want to display images according to UIImageView\'s rect size. Whether image is big or

相关标签:
7条回答
  • 2020-11-29 04:08

    Hope this helpful for you

    CGImageRef imageRef = CGImageCreateWithImageInRect([largeImage CGImage], cropRect);
    
    image = [UIImage imageWithCGImage:imageRef]];
    
    CGImageRelease(imageRef);
    
    0 讨论(0)
提交回复
热议问题