objective c - Remove KVO observer issue -
I have a menu controller that is connected to the visual context with a weak reference. View Controller is in the context of the menu controller.
The menu controller views some of the collection views in the view controller when the menu controller is deleted, then I In what place do I remove the KVO Supervisor? I believe that you do this in another way you should add the supervisor to the View Controller , Not in the menu controller: Just pass the menu controller as a logic for the You can remove the supervisor when you need it (I believe you want to do it in the delok method), still in view controller, in that scenario when your view controller If it will be canceled, then remove it from the supervisor first. delete [self.viewController.collectionViewAbusverver: for myself: the keypath: keypath]; , but in this place itself ViewController is already zero.
[Object addObserver: menuController forKeyPath: @ "openingBalance" ...];
addObserver: method and apply the
ValavForKeyPath: method in the menu controller .
Comments
Post a Comment