Objective-c multiple class implementation in one .m file
I would like to compile multiple classes 开发者_如何学Python(classA, classB and classC) in a single .m file :
@implementation ClassA
static ClassA *singletonClassA = nil;
+ (ClassA *) GetSingleton
{
/* some code */
}
@end
@implementation ClassB
static ClassB *singletonClassB = nil;
+ (ClassB *) GetSingleton
{
/* some code */
}
@end
@implementation ClassC
static ClassC *singletonClassC = nil;
+ (ClassC *) GetSingleton
{
/* some code */
}
@end
I compile to static library (.a file) successfully.
But when I explore . a file, I only see ClassA implementation !
Any help ?
@class classA,classB,classC; @implementation ClassA
....... ......
then rest out code .
Oups, sorry !
I asked my question too early !
I had a problem of project cleaninig, my .m was not updated and only classA was impemented !
Sorry about that !
精彩评论