I was thinking, if you assign the target as self
in the gesture recogniser's initWithTarget:action:
method, will you cause a circular retain? Since self
will retain the recogniser in self.gestureRecognizers
and it's possible the gesture recogniser to also retain self in initWithTarget:action
.
Would the following be a solution for it?
__weak VRDrawer* weakSelf = self;
UIGestureRecognizer* tapRec = [[UITapGestureRecognizer alloc] initWithTarget:weakSelf
action:@selector(handleTap:)];