Search code examples
objective-ciphone-sdk-3.0uitouch

How to detect a UIImageView inside a UIScrollView


HI
I have a UIScrollView
In this scrollView i have added an UIImage ,UILabel,UIButton.
I want to detect the double click of UIImage inside the UIScrollView.

-(void) touchesbegin:(NSSet *)touchs withEvent:(UIEvent *)event
{
    if([[touches anyObject]view]==??)
    {
       //MyCode on double tap of UIImageView inside UIScrollView
    }
}

what sholud i use in place of ?? to detect the UIImageView insde the UIScrollView.
Thanks for any help.


Solution

  • I think you can find the answer in the following sample code.

    This sample codes are come from Apple. You can find those sample codes at the UIImageView Class Reference.