I have a UIImageView which loads images with different aspect ratios. To display the full image properly I am using UIViewContentModeScaleAspectFit.
I need to be able to allow users to tap on image and tag friends. How do I calculate the X and Y percentages of the tap location relative to the actual image content - since UIImageView contains padding at top-bottom or sides to satisfy the UIViewContentModeScaleAspectFit constraint. I need to be able to isolate that out of the percentage calculation.
Also, the inverse needs to be done when the UIImageView needs to be rendered with the image and tags.