Reputation: 639
I having Two class(ClassA,ClassB).From ClassB i have to call a method of ClassA while calling that method i have to pass my ClassB object and i need to receive it in ClassA.Method in ClassA is a static method.How can i pass an Object in a method? if any one knows please help me..
Upvotes: 0
Views: 852
Reputation: 17478
You pass the reference of the ClassB by sending self
as parameter to a method in ClassA.
[ClassA methodName:self];
In ClassA,
+(void)methodName:(ClassB*)param;
Upvotes: 1