iphone Programming Glossary: classb.h
How can I solve this Problem with bidirectional dependencies in Objective-C classes? http://stackoverflow.com/questions/834955/how-can-i-solve-this-problem-with-bidirectional-dependencies-in-objective-c-clas  assign that to the childObject instance variable. It's header looks like this #import Foundation Foundation.h #import ClassB.h @interface ClassA NSObject ClassB childObject @end Then there is the header of ClassB. ClassB has to have a reference to.. .m files ClassA.h @class ClassB @interface ClassA NSObject ClassB childObject @end ClassA.m #import ClassA.h #import ClassB.h @implementation ClassA .. @end ClassB.h @class ClassA @interface ClassB NSObject ClassA parentObject id initWithClassA ClassA.. ClassA NSObject ClassB childObject @end ClassA.m #import ClassA.h #import ClassB.h @implementation ClassA .. @end ClassB.h @class ClassA @interface ClassB NSObject ClassA parentObject id initWithClassA ClassA newParentObject @end ClassB.m #import.. 
 Calling a method from another class in Objective C http://stackoverflow.com/questions/9629417/calling-a-method-from-another-class-in-objective-c  to see this post while researching. Here is a sample code ClassA.h file #import Foundation Foundation.h #import ClassB.h @interface ClassA NSObject ClassBDelegate @end ClassA.m file #import ClassA.h @implementation ClassA void createAnInstanceOfClassB.. call method from ClassB void calculate NSLog @ Do calculate thing calculate can be called from ClassB or ClassA @end ClassB.h file #import Foundation Foundation.h @protocol ClassBDelegate NSObject void calculate method from ClassA @end @interface.. this is optional to your question. If you also want ClassA to call method from ClassB @end ClassB.m file #import ClassB.h @implementation ClassB @synthesize delegate void whateverMethod self.delegate calculate calling method calculate on ClassA.. 
 
 
     
      |