I have an Indoor Mapping application. I have a .png that represents the map. Some pins need to be placed on the map programmatically at certain Points of Interest (stairs, elevators, shops etc).
Let's say that on an iPhone 5, I add a UIView as a subview for my UIImageView at the point
CGPointMake(100,y:100)
and it indicates(is put over) some stairs in the UIImageView. The problem is, when I run the app on an iPad, for example, the UIImageView is larger and the UIView is not over the stairs. I have to modify my x,y for the UIView.
I have tried to make some calculation to determine the newX and newY of the UIView according to the
UIScreen.mainScreen().bounds.size.width
and
UIScreen.mainScreen().bounds.size.height
but I couldn't manage to place that UIView in the same spot for every device.
Is there a 3rd party library that can solve my problem? Or an equation to determine the newX and newY?
Thank you,
Dragos