[英]What's the meaning of this piece of code?
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(requestAddressUpdatedNotification:)
name:MTAddressUpdatedNotification
object:nil];
誰能告訴我如果我在程序中編寫這段代碼會怎樣?
何時調用requestAddressUpdatedNotification
方法?
該代碼通知默認的NSNotificationCenter
在MTAddressUpdatedNotification NSNotification
發生時通知您的對象( self
)並觸發必須在同一類中定義的requestAddressUpdatedNotification:
方法(在MTAddressUpdatedNotification NSNotification
@implementation…@end
)。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.