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];
}
}
上一篇:目标文件去除header一行开头的#号


下一篇:python--使用MySQL数据库