Your calls to the NSNotificationCenter
methods are fine. A few things to consider:
ViewControllerB
instances won't register for the notification until-viewWillAppear:
has been called on them, so if you haven't shown your instance ofViewControllerB
yet (typically, if it's farther down the VC hierarchy than A), you can't get the notification call. Registering for notifications in-initWithNibName:bundle:
is more likely to be what you want.A corollary of that is: your instance of
ViewControllerB
must exist when you send the notification in order for it to be received. If you are loadingViewControllerB
fromMainStoryboard
in-nextView:
, then it hasn't registered for the notification yet.