I have added NSNotificationCenter
in viewDidLoad
method and removed in viewDidUnload
but it's not getting removed. I am following ARC. I have followed few answer but I didn't get luck. I dont have reputation for give comments so posting some thing looks like duplicate. Please don't -ve votes.
Sample code:
- (void)viewDidLoad
{
[[NSNotificationCenter defaultCenter ] addObserver:self.containerView
selector:@selector(loadInitialScreen)
name:CLEARSCREEN_DEPOSIT
object:NULL];
}
- (void)viewDidUnload
{
[[NSNotificationCenter defaultCenter] removeObserver:self.containerView
name:CLEARSCREEN_DEPOSIT
object:nil];
}