AUIViewController将自身添加到默认中心:
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(editFood)
name:@"editFood"
object:nil];
然后,UITableView委托NSObject发布NSNotification:
[[NSNotificationCenter defaultCenter]
postNotificationName:@"editFood"
object:self];
在运行时,它将获得EXC_BAD_ACCESS异常。
在defaultCenter得到释放的地方?当我从UIViewController向UIViewController发布通知时,相同的概念起作用,但这没关系,对吧?