ios 通知

//创建通知

NSDictionary*dic =@{@"address":address,@"longitude":longit,@"latitude":latit};

NSNotification*notification =[NSNotificationnotificationWithName:@"tongzhiPlaceAndName"object:niluserInfo:dic];

//通过通知中心发送通知

[[NSNotificationCenterdefaultCenter]postNotification:notification];




//接受来自选择地址的通知

[[NSNotificationCenterdefaultCenter]addObserver:selfselector:@selector(PlaceAndName:)name:@"tongzhiPlaceAndName"object:nil];

你可能感兴趣的:(ios 通知)