NSNotificationCenter 的使用
一般在 add
?
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil;
?
- (id) initWithCoder:(NSCoder *)aDecoder;
?
- (id) init;?
?
在
?
- (void) dealloc;中 remove
?
?
传说:
Important:?The notification center does not retain its observers, therefore, you must ensure that you unregister observers (using removeObserver: or removeObserver:name:object:) before they are deallocated. (If you don't, you will generate a runtime error if the center sends a message to a freed object.)
?
但是没发现崩溃的问题