Skip to content

Commit 086deda

Browse files
committed
clean up gesture recognizers
1 parent 705b98d commit 086deda

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

LXReorderableCollectionViewFlowLayout/LXReorderableCollectionViewFlowLayout.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ - (id)initWithCoder:(NSCoder *)aDecoder {
126126
}
127127

128128
- (void)dealloc {
129+
[self.collectionView removeGestureRecognizer:self.panGestureRecognizer];
130+
[self.collectionView removeGestureRecognizer:self.longPressGestureRecognizer];
129131
[self invalidatesScrollTimer];
130132
[self removeObserver:self forKeyPath:kLXCollectionViewKeyPath];
131133
[[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationWillResignActiveNotification object:nil];

0 commit comments

Comments
 (0)