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

后端 未结 8 1748
温柔的废话
温柔的废话 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:50

    UIImageView *imageView = [[[UIImageView alloc]initWithImage:[UIImage imageNamed:@"MyImage.png"]]autorelease];
    
    NSLog(@"Size of my Image => %f, %f ", [[imageView image] size].width, [[imageView image] size].height) ;
    

提交回复
热议问题