I have some UIImage
and display it in UIImageView
.
I need to use UIViewContentModeScaleAspectFit
content mode.
Here is simple code:
UIImageView *imageView = [[UIImageView alloc] initWithFrame:self.view.bounds];
imageView.image = self.image;
imageView.contentMode = UIViewContentModeScaleAspectFit;
[self.view addSubview:imageView];
[imageView release];
How to know the size of an image which is displayed on the screen? Are there any solutions, properties or shall i calculate it manually?
EDIT:
I know about the property image.size
.
self.image.size
->>> Original image size
imageView.image.size
->>> Size of the imageView, but not the displayed image.
I ask about the displayed size depending on the imageView's size
and it's contentmode
.