开发者

How to do multiple interfaces in Objective C?

开发者 https://www.devze.com 2022-12-19 09:03 出处:网络
How can I do the following things in Objective C (the examples below are in p开发者_JAVA技巧seudo-code):

How can I do the following things in Objective C (the examples below are in p开发者_JAVA技巧seudo-code):

  1. interface A extends B, C

  2. interface A

interface B

class X inplemements A, B

3. interface A

class X implements A

class Y implements A

interface B

class Z extends Y implements B

thanks!


Sounds like homework, you should take the first move: http://en.wikipedia.org/wiki/Objective-C

look at 2.2 Interfaces and implementations

MyClass extends Class

 @interface MyClass : Class { }
 @end

MyClass extends Class implements Interface1 & Interface2

 @interface MyClass : Class <Interface1, Interface2> {}
 @end
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号