In the UIView, there is several sub views of UIImageView objects.
Since I need to detect the touch events from the UIImageView and from the remaining area of the UIView.
Can I implement touch events in UIView and UIImagView simultaneously ?
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Based on your comment, I think you should consider gesture recognizers. Use the
UITapGestureRecognizerto identify and respond to taps on a view.define
-(void)handleTapOnView:(UITapGestureRecognizer*)gestureand-(void)handleTapOnImage:(UITapGestureRecognizer*)gestureand handle the touches there.There are other kinds of gestures too. You can read more about them here.