iphone - how can i get the height and width of uiimage

后端 未结 8 1726
温柔的废话
温柔的废话 2020-11-30 18:03

From the URL Image in Mail

I\'m adding image to mail view. It will show full image. But I want to calculate, proportionally change the height and width of the image.

8条回答
  •  渐次进展
    2020-11-30 18:38

    UIImage *img = [UIImage imageNamed:@"logo.png"];
    
    CGFloat width = img.size.width;
    CGFloat height = img.size.height;
    

提交回复
热议问题