看板 MacDev 關於我們 聯絡資訊
當Core Data的entity間有relationship時 該entity的subclass of NSManagedObject的header file會看到@class的用法 基本上 @class MyClass的效果跟#import "MyClass"類似 只不過@class 只告訴complier 「MyClass是一個class」 但沒有告訴compiler其它的資訊 ex:method, property 這裡有一篇在談@class directive 分享給大家 http://www.iosappsforeveryone.com/Chapter2Part6ReferencingClasses.htm -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.230.79.222
Killercat:這個可能要寫過c/c++的人比較好理解為什麼要這樣做 =P 07/24 09:28
Killercat:我是不知道obj-c這樣能不能減低過大的相依性讓編譯速度 07/24 09:30
Killercat:以及整個結構都變好就是... 07/24 09:30
issuemylove:專有名詞應該是 forward declare 07/25 11:12
wfgh:文章裡就有提到了吧 forward declaration 07/25 13:39