A UIViewController adds itself to the center by default:
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(editFood) name:@"editFood" object:nil];
Then a UITableView delegate of NSObject sends a NSNotification :
[[NSNotificationCenter defaultCenter] postNotificationName:@"editFood" object:self];
At run time, it gets an EXC_BAD_ACCESS exception.
Is defaultCenter anywhere? The same concept works when I send a notification to a UIViewController from a UIViewController, but that doesn't matter, right?
ios objective-c iphone nsnotificationcenter exc-bad-access
Paul Jordan Apr 14 '11 at 19:41 2011-04-14 19:41
source share