iOS Dev (54) 键盘弹出后收起时View随之移动
作者:大锐哥博客:http://prevention.iteye.com
-
添加监听
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(c...
分类:
移动开发 时间:
2014-06-22 14:56:07
阅读次数:
222
NSDictionary *dic = [NSDictionary
dictionaryWithObjectsAndKeys: [NSNumber numberWithInt:2] , @"actcode",nil];
//首先设置需要通知的方法。加入通知中心。比如当程序跑到这时就通知游戏 ...
分类:
移动开发 时间:
2014-06-12 12:40:55
阅读次数:
224
?每一个应用程序都有一个通知中心(NSNotificationCenter)实例,专门负责协助不同对象之间的消息通信?任何一个对象都可以向通知中心发布通知(NSNotification),描述自己在做什么。其他感兴趣的对象(Observer)可以申请在某个特定通知发布时(或在某个特定的对象发布通知时...
分类:
移动开发 时间:
2014-06-09 20:03:31
阅读次数:
249
1 基本用法
添加观察(可能很多页面)
[[NSNotificationCenter
defaultCenter] addObserver:self
selector:@selector(changeIntlCode:)
name:NOTIFICATION_SUCCESS_SELECT_INTLCODE
object:nil];
发出通知(可能只有一个页面)
...
分类:
移动开发 时间:
2014-06-07 13:37:38
阅读次数:
223
每一个应用程序都有一个通知中心,NSNotificationCenter,专门负责协助不同对象之间的消息通信任何一个对象都可以向通知中心发布通知NSNotification,描述自己在做什么。其他感兴趣的对象(Observer)可以申请在某个特定通知发布时(或在某个特定的对象发布通知时)收到这个通知...
分类:
移动开发 时间:
2014-06-02 07:24:48
阅读次数:
241
NSNotificationCenter 较之于 Delegate
可以实现更大的跨度的通信机制,可以为两个无引用关系的两个对象进行通信。NSNotificationCenter 的通信原理使用了观察者模式; 1.
NSNotificationCenter 注册观察者对某个事件(以字符串命名)...
分类:
移动开发 时间:
2014-06-02 01:22:35
阅读次数:
289
消通知机制:3个步骤:1.通知的发布2.通知的监听3.通知的移除需要了解的要点1.通知中心:(NSNotificationCenter)每一个应用程序都有一个通知中心(NSNotificationCenter)实例,专门负责协助不同对象之间的消息通信任何一个对象都可以向通知中心发布通知(NSNoti...
分类:
移动开发 时间:
2014-05-31 14:15:20
阅读次数:
259
//A控制器中- (void)toDo{ [[NSNotificationCenter
defaultCenter] addObserver:self selector:@selector(nearbyToRootVcCommunication)
name:@"nearbyToRootVcCo...
分类:
其他好文 时间:
2014-05-25 19:16:58
阅读次数:
228
本文转载至http://blog.csdn.net/chengyingzhilian/article/details/7874408作用:NSNotificationCenter是专门供程序中不同类间的消息通信而设置的.注册通知:即要在什么地方接受消息[[NSNotificationCenterde...
分类:
其他好文 时间:
2014-05-21 21:31:14
阅读次数:
253