A UIViewController
adds itself to the default center:
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(editFood)
name:@"editFood"
object:nil];
Then a UITableView
delegate NSObject posts a NSNotification
:
[[NSNotificationCenter defaultCenter]
postNotificationName:@"editFood"
object:self];
During run time it get a EXC_BAD_ACCESS exception.
Is the defaultCenter
getting released somewhere? The same concept works when I post a notification to a UIViewController from a UIViewController, but that shouldn't matter, right?