鍍金池/ 問答/C  iOS/ iOS開發(fā),你們是如何處理通知的?

iOS開發(fā),你們是如何處理通知的?

1.是把通知全部寫在PCH文件中

2.還是寫在一個.h文件中如這樣:

NSString *const ZOCCacheControllerDidClearCacheNotification = @"ZOCCacheControllerDidClearCacheNotification";

3.還是在.h文件中定義,在.m文件中聲明如這樣:
.h文件

extern NSString *const ZOCCacheControllerDidClearCacheNotification;

.m文件

NSString *const ZOCCacheControllerDidClearCacheNotification = @"heheda";
回答
編輯回答
北城荒

第三個, 畢竟Apple API也是用這種.

clipboard.png

2017年3月13日 11:27