How to detect a UIImageView inside a UIScrollView
HI
I have a UIScroll开发者_如何转开发View 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.I think you can find the answer in the following sample code.
- TapDetectingImageView.h
- TapDetectingImageView.m
This sample codes are come from Apple. You can find those sample codes at the UIImageView Class Reference.
精彩评论