开发者

How to detect a UIImageView inside a UIScrollView

开发者 https://www.devze.com 2023-01-14 11:59 出处:网络
HI I have a UIScroll开发者_如何转开发View In this scrollView i have added an UIImage ,UILabel,UIButton.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号