For the sake of completeness.
The UIImageView inside of UIScrollView is not programmed to receive touch events and gestures natively.
So what you may want to do is:
- Add UITapGestureRecognizer to the scroll view for enabling touch inside scroll view.
>
UITapGestureRecognizer *singleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(singleTapGestureCaptured:)];
singleTap.cancelsTouchesInView = NO;
[myScrollView addGestureRecognizer:singleTap];
- Customize the UIImageView with you view inherited from UIImageView.
>
CustomImageView *imageView = [[CustomImageView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
[imageView setUserInteractionEnabled:YES];
[scrollView addSubview:imageView];
- Provide touch methods in that custom subclass and add it on your UIScrollView..
>
@interface CustomImageView : UIImageView{}
@implementation CustomImageView
- (id)initWithFrame:(CGRect)frame{}
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {}
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {}
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {}
@end