开发者

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 !

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜