Consider this:
id observer = [[NSNotificationCenter defaultCenter] addObserverForName:MyNotification object:nil
yes, I think declaring observer beforehand as __block id observer; should work.
__block id observer;