IOS 通知中心(个人)
2013-11-28 14:35
337 查看
使用这个IOS通知中心,其实和安卓的广播一样,起码我是这么觉得,都是广播吧
postData 为通知名称,object 为通知对象,以下为接收通知
-(void)postset:(NSNotification*) notification{
NSString *obj = [notification
object];//获取到传递的对象
}
[[NSNotificationCenter defaultCenter] postNotificationName:@"postData" object:nil];
postData 为通知名称,object 为通知对象,以下为接收通知
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector (postset:) name:@"postData" object:nil];
-(void)postset:(NSNotification*) notification{
NSString *obj = [notification
object];//获取到传递的对象
}
相关文章推荐
- iOS 通知中心传值
- iOS 使用tableView实现 个人中心列表
- IOS NSNotification Center 通知中心的使用
- iOS 购物—个人中心界面
- iOS监听模式系列之通知中心
- iOS通知中心的简单实现-YRSignal
- IOS观察者模式与通知中心
- iOS 通知中心扩展制作初步-b
- QF——iOS通知中心(NotificationCener)
- iOS 通知中心扩展制作入门
- IOS开发从手机相册中上传头像到APP的个人中心同时保存到数据库
- IOS客户端的个人中心可以查看自己的博客了。
- iOS基础 - 通知中心(NSNotificationCenter)
- iOS 8中的通知中心快速回复
- iOS 使用tableView实现 个人中心列表
- iOS 设计模式-NSNotificationCenter 通知中心
- 随笔:关于ios通知中心插件widget验证的一些坑
- iOS开发 通知中心传值以及仅通知
- Delphi for iOS开发指南(13):在iOS Device中使用通知中心
- IOS开发类似于微博个人中心的头像可以拖动lei