Do I need to release a gesture recognizer?

前端 未结 1 1948
不知归路
不知归路 2021-02-04 00:44

If I add a gesture recognizer to a table cell called cell, e.g.:

UILongPressGestureRecognizer *_longPressRecognizer = [[UILongPressGestureRecognizer         


        
相关标签:
1条回答
  • 2021-02-04 01:19

    The gesture recognizers are added to an internal NSMutableArray of the view. This array will be released once the view is deallocated. Thus -removeGestureRecognizer: doesn't need to be called manually.

    0 讨论(0)
提交回复
热议问题