2011年3月25日 星期五

notification on iOS and Cocoa

注冊接收notification
ex:
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(test:) name:@"TEST_NOTIFICATION" object:nil];
addObserver: 接收notification的物件
object: 有興趣的對象,也就是發出notification的對象。nil表示不限對象。


沒有留言:

張貼留言