I am porting a project from C# to Objective-C, and I would like to know how to implement an Internal class in Objective-C (Internal meaning only visible inside of this project).
For example, I have the code in C#:
public abstract class AbstractBaseClass : AInterface
{
// methods go here
}
internal class InternalSubclass : AbstractBaseClass
{
// methods go here
}
This Is the code I have converted so far:
// AbstractBaseClass.h
#import <Foundation/Foundation.h>
#import "AInterface.h"
@interface AbstractBaseClass : NSObject<AInterface>
// methods go here
@end
// AbstractBaseClass.m
#import "AbstractBaseClass.h"
@implementation AbstractBaseClass
-(void) abstractMethod
{
[NSException raise:@"abstract method" format:@"This method is abstract, and thus cannot be called"];
}
// more methods
@end
Where should I put the interfaces and implementations of InternalSubclasses? Should they be in a separate file called InternalClasses.h/m
? Or should I just not have a header for those files and just have a .m file for them.
Any help would be appreciated!