My TableViewCell register for Notifications. But i can't unregister because i don't know when. I tried to subclass NSNotificationCenter but i didn't tried it the right way.
Some Ideas how to fix this?
My TableViewCell register for Notifications. But i can't unregister because i don't know when. I tried to subclass NSNotificationCenter but i didn't tried it the right way.
Some Ideas how to fix this?
A classic approach would registering your notifications within a
UIViewControllerderived class inviewDidLoadand unregistering inviewDidUnload.For a
UIViewderived class, you should really think twice if you are going the right way (mixing display-logic- with business-logic-code). However, you could register ininitWithFrameand unregister ondealloc.Since
UITableViewCellisUIViewderived, the right places could be registering ininitWithStyleand unregistering indeallocas well (in case you are not reusing your cells).