ios 通知

2016-05-19  本文已影响0人  94bu1yang

//创建通知

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];

上一篇下一篇

猜你喜欢

热点阅读