PDA

View Full Version : 2 interface and 2 implementation in one class possibility?




saleh.hi.62
Dec 9, 2011, 10:28 PM
is it possible to have 1 class with 2 interface in Header file and 2 implementation in M file?



Catfish_Man
Dec 9, 2011, 11:08 PM
is it possible to have 1 class with 2 interface in Header file and 2 implementation in M file?

That's called "having 2 classes", but yes it works fine. Each @interface defines a class, each @implementation implements one. Doesn't matter how many of each you have in a file, or what files they're in, really.

mduser63
Dec 10, 2011, 10:50 AM
Why do you want to do this? What are you trying to accomplish?

Take a look at Categories and Class Extensions: http://developer.apple.com/library/ios/#documentation/cocoa/conceptual/objectivec/chapters/occategories.html