1.Fixed the issue for gesture's being added twice:
When a push behaviour happens, the toVC add a gesture; when a pop behaviour happens, the toVC should remove the added gesture first, then add a new one. The old code just added gesture twice.
2.Removed unnecessary variable and dealloc method:
UIView will remove all its gestures when dealloc automatically, so it's no need to remove the added gestures. Furthermore, the CEBaseInteractionController is used as a singleton, its dealloc method will never get called.
1.Fixed the issue for gesture's being added twice: When a push behaviour happens, the toVC add a gesture; when a pop behaviour happens, the toVC should remove the added gesture first, then add a new one. The old code just added gesture twice.
2.Removed unnecessary variable and
dealloc
method:UIView
will remove all its gestures when dealloc automatically, so it's no need to remove the added gestures. Furthermore, theCEBaseInteractionController
is used as a singleton, itsdealloc
method will never get called.