synblog

the round pegs in the square holes

UIScrollView(UITableView, UICollectionView)の上にUIGestureRecognizerをおくと、元のUIScrollViewのgestureが効かなくなってしまう問題

  1. scrollViewを置いてあるUIViewControllerにUIGestureRecognizerDeleageを追加
  2. gestureRecognizerのdelegateにselfを代入
  3. 以下メソッドを実装
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer
{
    return YES;
}