【Mediator模式】
通过mediator来让各个相互通知的对象解耦。在iOS框架中就是NSNotificationCenter。
参考:http://www.jdon.com/designpatterns/mediator.htm
分类:
其他好文 时间:
2014-07-22 23:08:55
阅读次数:
237
1.注册通知[NSNotificationCenter defaultCenter]
addObserver:self selector:@selector(notify) name:@"myNotify"
object:nil];-(void)notify{ NSLog(@"notify");}....
分类:
移动开发 时间:
2014-05-23 10:02:56
阅读次数:
306
NSNotificationCenter:键盘出现、消失时的通知UIKeyboardWillShowNotification;UIKeyboardDidShowNotification;UIKeyboardWillHideNotification;UIKeyboardDidHideNotif...
分类:
移动开发 时间:
2014-05-10 23:58:24
阅读次数:
570
在Cocoa
Touch框架中,有UIApplication、UIAccelerimeter、NSUserDefaults和NSNotificationCenter等单例类。另外,NSFileManager和NSBundle类虽然属于Cocoa框架的内容,但也可以在Cocoa
Touch框架中使.....
分类:
移动开发 时间:
2014-05-09 08:48:07
阅读次数:
363