---restore content starts---
Ns_assume_nonnull_begin
/**************** Notifications ****************/
The notice, which is sent, is received.
@interface nsnotification: nsobject <nscopying, nscoding>
Name of the notice
@property (readonly, copy) nsstring *name;
A specific object.
@property (nullable, readonly, retain) ID object;
Parameter information
@property (nullable, readonly, copy) nsdictionary *userinfo;
Initialize a Notification object
Name in the future who will accept, (send to whom)
Object specific to one of the objects, or nil,
UserInfo additional information, parameters
-(instancetypensstring *) Name object: (nullable id) object UserInfo: (nullable nsdictionary *) UserInfo ns_available (10_6, 4_0) ns_designated_ Initializer
-(nullable instancetype) Initwithcoder: (nscoder *) Adecoder Ns_designated_initializer ;
@end
@interface nsnotification (nsnotificationcreation)
Initialize a notification
+ (instancetype) Notificationwithname: (nsstring *) AName object: (nullable ID) AnObject;
Ditto
+ (instancetype) Notificationwithname: (nsstring *) AName object: (nullable ID ) AnObject UserInfo: (nullable nsdictionary *) auserinfo;
-(instancetype) init /*ns_unavailable*/; /* do not invoke; not a valid initializer to this class * /
@end
/**************** Notification Center ****************/
@interface nsnotificationcenter: nsobject {
@package
void * __strong _impl;
void * __strong _callback;
void *_pad[);
}
Simple interest, get notification hubs, register, or send notifications. Must be first registered, sent after. Otherwise, it is invalid.
+ (nsnotificationcenter *) defaultcenter;
Registration notification, (monitoring notification)
-(void) Addobserver: (ID) Observer selector: (SEL) aselector name: (nullable NSString *) AName object: (nullable ID) anobject;
Send Notifications
-(void) Postnotification: (nsnotification *) notification;
-(void) Postnotificationname: (nsstring *) AName object: (nullable ID) anobject;
-(void) Postnotificationname: (nsstring *) AName object: (nullable ID) AnObject UserInfo: (nullable nsdictionary *) auserinfo;
Remove notifications
-(void) Removeobserver: (ID) observer;
-(void) Removeobserver: (ID) Observer name: (nullable nsstring *) AName object: ( nullable ID) anobject;
-(id <nsobject >) Addobserverforname: (nullable NSString< Span class= "S1" > *) Name object: (nullable id) Obj queue: (nullable nsoperationqueue *) queue Usingblock: (void (^) (nsnotification *note)) Block ns_available (10_6, 4< Span class= "S1" >_0)
//The return value is retained by the system, and should was held onto by the caller in
//order to remove the observer with Removeobserver:later and to stop observation.
@end
Ns_assume_nonnull_end
---restore content ends---
Notification CENTER-Nsnotificationcenter