码迷,mamicode.com
首页 >  
搜索关键字:nsnotificationcenter    ( 284个结果
通知的作用。
实时更新点赞数量,小手点击事件中添加:[[NSNotificationCenter defaultCenter] postNotificationName:MTRefreshHomeHttpNotification object:nil];主页面添加:[[NSNotificationCenter d...
分类:其他好文   时间:2014-12-08 15:20:22    阅读次数:127
[iOS基础控件 - 6.10] Notification 通知机制
A.定义 iOS程序都有一个NSNotificationCenter的单例对象,用来负责发布不同对象之间的通知 任何对象都能够在NSNotificationCenter发布通知,发布自己的发生的事件;监听者(Observer)可以选择接受某个特定通知。B.使用1. 属性 - (NSString*)n...
分类:移动开发   时间:2014-12-07 21:42:24    阅读次数:264
Keyboard 视图随键盘升高降低
(void)viewWillAppear:(BOOL)animated {     [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:nil];     [[...
分类:其他好文   时间:2014-12-05 19:24:14    阅读次数:169
IOS键盘挡住UITextView的解决方案
- (void)registerForKeyboardNotifications { [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWasShown:) name:UIKeyboardDidShowNotification object:nil]; [[NSNoti...
分类:移动开发   时间:2014-12-04 14:00:20    阅读次数:168
检测手机翻转
代码:- (void)viewDidLoad{ [super viewDidLoad]; // Do any additional setup after loading the view. //监听手机方向改变事件 [[NSNotificationCenter de...
分类:移动开发   时间:2014-12-01 15:36:46    阅读次数:153
UI基础之 通知(NSNotificationCenter)
一:通知中心:每一个应用程序都有一个通知中心(NSNotificationCenter)实例,专门负责协助不同对象之间的消息通信任何一个对象都可以向通知中心发布通知(NSNotification),描述自己在做什么。其他感兴趣的对象(Observer)可以申请在某个特定通知发布时(或在某个特定的对象...
分类:其他好文   时间:2014-11-29 23:00:51    阅读次数:208
iOS 页面传值的几种方式之NSNotificationCenter传值
接着上回说的iOS页面传值问题传送门---------->iOS页面传值之代理传值接下来我们说说NSNotificationCenter传值方式在开始之前,我们首先得知道KVO模式Key-Value Observing (KVO)键值监听就是说当你告诉通知中心一个Key 他会根据Value的变化做些...
分类:移动开发   时间:2014-11-27 17:43:58    阅读次数:153
iOS 监听键盘变化
//将要显示键盘 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(willShowKeyboard:) name:UIKeyboardWillShowNotification object...
分类:移动开发   时间:2014-11-19 00:02:23    阅读次数:342
NSNotificationCenter
注册一个Notification [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receivedNotification:) ...
分类:其他好文   时间:2014-11-17 17:28:15    阅读次数:137
iOS设计模式之NSNotificationCenter 消息中心
为初学者简单介绍:消息中心 NSNotificationCenter的原理和使用方法,让其快速上手,使用到自己的开发中...
分类:移动开发   时间:2014-11-09 15:22:14    阅读次数:172
284条   上一页 1 ... 22 23 24 25 26 ... 29 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!