NSNotificationCenter 传对象

NSNotificationCenter 传对象
 [[NSNotificationCenter defaultCenter] postNotificationName:@"postCity" object:pro];

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(cityCallBack:) name:@"postCity" object:nil];

- (void)cityCallBack:(NSNotification *)notification
{
    if (nil != notification.object)
    {
        ProvinceModel *obj = (ProvinceModel *)notification.object;
        [addresslbl setText: obj.cityName];
    }
}
NSNotificationCenter 传对象

NSNotificationCenter 传对象

上一篇:Memcached‘do_item_get’函数安全漏洞


下一篇:java 获取微信服务器ip