Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ncohen

macrumors newbie
Original poster
Mar 31, 2009
8
0
Hello,
I would like to create an interface without implementation... it would be an interface of a class which makes reference to the methods only. Is it possible to do that?

For example:

Superclass.h
Code:
@interface Superclass : NSObject
{
	
}
-(void)method1;
-(void)method2;
@end

Subclass.h
Code:
@interface Subclass : Superclass
{
	int variable1;
        int variable2;
}
-(void)method1;
-(void)method2;
@end

Subclass.m
Code:
@implementation Subclass
-(void)method1
{
      // some code
}

-(void)method2
{
      // some code
}
@end

This code doesn't work... is it possible to do something like that?

Thanks
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.