我有一个子视图向其父视图发送通知的情况。现在我打电话addObserver:
进来。但是,我猜这是不正确的,因为在刷新视图时调用。viewWillAppear:
removeObserver:
viewWillDisappear:
viewWillAppear:
[[NSNotificationCenter defaultCenter] addObserver: (id)observer selector: (SEL)aSelector name: (NSString *)aName object: (id)anObject];
[[NSNotificationCenter defaultCenter] removeObserver: (id)observer name: (NSString *)aName object: (id)anObject];
谢谢。