I have a UIImageView with a UIImage inside set to scale aspect ratio. The image is more tall than wide and there is a transparent region on either side of the UIImageView. How can I convert the tap location of the UIImageView to correct locations inside of the UIImage?
Share
you have the original width and height of the image. divide it with the width and height of the view. multiply the factor
image.size.height/view.frame.size.heightwith theyyou tapped andimage.size.width/view.frame.size.widthwith the tappedx.