Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to do multiple interfaces in Objective C?

Tags:

objective-c

How can I do the following things in Objective C (the examples below are in pseudo-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!

like image 972
alexeypro Avatar asked Feb 09 '10 01:02

alexeypro


1 Answers

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
like image 149
Mobs Avatar answered Sep 18 '22 16:09

Mobs