You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 2, 2018. It is now read-only.
When using the whenTapped method my view is retained and doesn't get released properly even if i use [myview whenTapped:nil];
when i remove my gestures manually:
for (UIGestureRecognizer *tempGesture in [self gestureRecognizers] )
[self removeGestureRecognizer:tempGesture];
after i set whenTapped to nil and i release my view it gets released properly.
maybe this should be done blockskit ? or maybe the problem exists somewhere else?
The text was updated successfully, but these errors were encountered:
Internally, the whenTapped: et. al. methods aren't setters; they just auto-initialize a UITapGestureRecognizer, which is noted in our documentation and will be clarified in the future. So calling [view whenTapped:nil] isn't useful.
UIGestureRecognizers shouldn't be retaining the view on release; that behavior isn't documented by Apple and it doesn't quite make sense. You should be autoreleasing (or in ARC, not doing anything at all) gesture recognizers as the view retains them. I've never seen it work any other way. All of this should be taken care of automatically unless you still have a reference to the gesture recognizer and/or view. I will investigate this further.
If you can't get it to work, my personal recommendation is to try setting up the gesture recognizers yourself using UIGestureRecognizer+BlocksKit. I'm not a huge fan of those methods myself, and I'll look into improving them.
Part of this is already being fixed in the experimental branch, and the rest I'll fix myself by 1.0. *EDIT: * Confirmed that the regular behavior of UIGestureRecognizer is as I said. Closing this for now. Please reopen if you continue to have issues.
When using the whenTapped method my view is retained and doesn't get released properly even if i use [myview whenTapped:nil];
when i remove my gestures manually:
for (UIGestureRecognizer *tempGesture in [self gestureRecognizers] )
[self removeGestureRecognizer:tempGesture];
after i set whenTapped to nil and i release my view it gets released properly.
maybe this should be done blockskit ? or maybe the problem exists somewhere else?
The text was updated successfully, but these errors were encountered: