How can I call a method from other Objective-C class? -
let's say, in a.h file:
-(void)show; in a.m file:
-(void)show{ //.... } in b.m:
[self show]; how can call show b.m? imported a.h guess, has no effect.
in order call method need instance of object on call method. example, if file a.h has class myclassa, call of show this:
myclassa *instancea = [[myclassa alloc] init]; [instancea show];
Comments
Post a Comment