Undo [UIGestureRecognizer* requireGestureRecognizerToFail]
cocoa-touch, ios, memory-management, objective-c, uigesturerecognizer
Solution
Your questions:
How do I unregister tgr2 with tgr1?
You have many options.
- You can remove it from the view.
- You can disable tgr2.
- To keep the two recognizes you will need to create a new recognizer equal that was require to fail and add it, I do not know how to only remove the dependence between they, and do not know if is there a way.
Does tgr2 actually released or does tgr1 now have a reference?
tgr2 will not have the the retain count incremented when you add to tgr1 requireGestureRecognizerToFail with tgr2.
If not, will releasing tgr2 cause problems?
No, it will no cause problem, only that tgr2 will always fail and it will call tgr1
Problem
Is there a way to undo requireGestureRecognizerToFail. I set up a dependency between two UIGestureRecognizers with requireGestureRecognizerToFail like this. ``` UITapGestureRecognizer* tgr1 = [UITapGestureRecognizer alloc] initWithTarget ...]; UITapGestureRecognizer* tgr2 = [UITapGestureRecognizer alloc] initWithTarget ...]; [tgr1 requireGestureRecognizerToFail: tgr2]; ... // later in the code [tgr2 release]; ``` How do I unregister tgr2 with tgr1? Does tgr2 actually released or does tgr1 now have a reference? If not, will releasing tgr2 cause problems? Thanks