ios - Removing all notification observer from a single place -


i want remove notification observer , using method:

removeobserver: name:@"mynotification" object:nil 

for this. there many observers listening notification , want remove of them in 1 shot centralized place. can pass 'nil' in first parameter , remove observers listening mynotification?

you can remove object notification center means no notifications triggered. example, when have view controller has registered notifications, include line in dealloc.

[[nsnotificationcenter defaultcenter] removeobserver:self]; 

this @ object level...so unregister many notifications. won't unregister 1 notification in many objects.

hope understood question correctly.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -