The interface should looks as follows:
@interface NameOfClass : NameOfSuperclass
{
instance variables here...
}
class methods
instance methods
@end
Example:
@interface SomeClass : NSObject
{
NSString *str;
NSDate *date;
int x;
}
// Getters
-(int) x;
-(NSString *) str;
-(NSDate *) date;
// Setters
-(void )setX:(int) input;
-(void) setStr:(NSString *)input;
-(void) setDate:(NSDate *)input;
// Other
-(void) printInstanceVars;
-(void) dealloc;
@end
No comments:
Post a Comment