Posticationicationname: message transmission details; postNotificationName
1. Define the association value of the message creation, that is, the identifier for finding the Method
NSString * const GameToIPhoneNotification = @ "GameToIPhoneNotification"; GameToIPhoneNotification variable, @ "GameToIPhoneNotification" is stored in the notification center. The information center uses this value to identify variables.
1. Register a message center
Nsicationicationcenter * center = [NSNotificationCenter defacenter center];
[Center addObserver: self selector: @ selector (onToIphone :) name: GameToIPhoneNotification object: nil];
-(Void) onToIphone :( NSNotification *) notify: This method is called to receive the GameToIPhoneNotification notification.
2. Call information
Nsicationicationcenter * center = [NSNotificationCenter defacenter center];
[Center postNotificationName: GameToIPhoneNotification object: nil userInfo: [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithInt: SMSRecommendNotification], @ "actcode", nil];
[NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithInt: SMSRecommendNotification] This is the parameter passed to-(void) onToIphone :( NSNotification *) policy.