Say, I'm building a custom UISegmentedControl by laying out several buttons and describing their states. I am attaching TouchUpInside listeners to them in order to change their appearance accordingly, when selected. The problem is that I don't know where to remove these listeners in order to avoid a memory leak. UIView and UIControl don't have ViewDidDisappear like UIViewController which I'm using to remove listeners when it becomes invisible.
Where should I remove these listeners?