UITouch detection in frame

Discussion in 'iOS Programming' started by beardedpig, Dec 20, 2008.

  1. beardedpig macrumors member

    Dec 17, 2008

    ! have an image displayed in a UIImageView and on top of this view ! have another UIImageView that has a translucent circle which frames the underlying image.

    The top UIImageView has no user interaction or multitouch but the underlying UIImageView does.

    therefore I only want touches to be processed by te visible portion of the image not when the user touches any part of the frame.

    from my understanding all touche events get passed to the UIImageView that lies underneath the frame so even if the user clicks the frame the touch is processed.

    so do i have to do some advanced math using the touch location to determine if the touch occured inside the frame thus on the image?

  2. kainjow Moderator emeritus


    Jun 15, 2000
    Should be fairly easy with something like CGRectContainsPoint().

Share This Page