Skip to content

Instantly share code, notes, and snippets.

@mint149
Created June 6, 2014 01:45
Show Gist options
  • Save mint149/9ec45da0fe7a907a5b37 to your computer and use it in GitHub Desktop.
Save mint149/9ec45da0fe7a907a5b37 to your computer and use it in GitHub Desktop.
UIImageViewにUISwipeGestureRecognizerを乗せる時は、UIImageView.userInteractionEnabledをYESにしないといけない。
UIImage *hogeImage = [UIImage imageNamed:@"hoge.png"];
UIImageView *hogeView = [[UIImageView alloc] initWithImage:hogeImage];
hogeView.userInteractionEnabled = YES;
[hogeView addGestureRecognizer:swipeDownGesture];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment