看板 MacDev 關於我們 聯絡資訊
那如果用protocol宣告介面, 再用 id <xxxx> m_pMyItem; 來宣告該instance呢? 如 @protocol FooInterface <NSObject> - (void)IamFoo; @end @interface Foo : NSObject { id <FooInterface> m_pMyItem; ///< 實作FooInterface的NSObject衍生類別。 } @end -- <. . 野ブタパワー ~~~ @@ 注入!! ︱﹨ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.216.119.224