Gesture recognizer (swipe) on UIImageView

后端 未结 6 2082
栀梦
栀梦 2020-12-14 06:19

I am trying to NSLog when I swipe over an UIImageView with this code, but it does not work for some reason. Any idea ?

@implementation ViewController

- (voi         


        
6条回答
  •  佛祖请我去吃肉
    2020-12-14 06:54

    Be sure to add imageView.userInteractionEnabled = YES; after you create your UIImageView.

    This allows users to interact with your view such as a tap, drag, swipe or other general gestures.

    See the documentation here.

提交回复
热议问题