UIScrollView scaling etc

Discussion in 'iPhone/iPad Programming' started by beardedpig, Jan 13, 2009.

  1. macrumors member

    Joined:
    Dec 17, 2008
    #1
    This problem comes in two parts but as they both related to the same thing I have put them in the same thread.

    First off is there a a way to track or find out when scrolling an image in and out by what ratio the scaling is?

    For instance if the user starts off with an image 1000 * 800 and they pinch it to make it smaller thus seeing more of the image is they a way to see by what ratio the scaling is?

    secondly, related to the above, say on this image of 1000 * 800 there is a hotspot the user can tap to trigger an action. at full size the x,x origin of this hotspot will be different if the image is scaled down by a user pinching it.

    So I suspect I need a method to determine / track the scale ratio so I can then locate the hotspot.

    Could someone continue to teach me to fish please?

    Thanks
     

Share This Page