作者aecho (星空下的鲔鱼)
看板MacDev
标题Re: [问题] 类别变数
时间Mon May 31 09:13:43 2010
那如果用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