¡@

Home 

2014/10/15 ¤U¤È 10:05:06

iphone Programming Glossary: classb

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

Okay this might be a very silly beginner question but I've got an ClassA which will create an child object from ClassB and assign that to an instance variable. In detail ClassA will alloc and init ClassB in the designated initializer and assign.. will create an child object from ClassB and assign that to an instance variable. In detail ClassA will alloc and init ClassB in the designated initializer and assign that to the childObject instance variable. It's header looks like this #import.. 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..

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.. 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 ClassB myClassB ClassB.. ClassA NSObject ClassBDelegate @end ClassA.m file #import ClassA.h @implementation ClassA void createAnInstanceOfClassB ClassB myClassB ClassB alloc init create an instance of ClassB myClassB.delegate self set self as the delegate myClassB..

what is the difference between Delegate and Notification?

http://stackoverflow.com/questions/5325226/what-is-the-difference-between-delegate-and-notification

Delegate and Notification i understood like delegate and protocol @protocol classADelegate void DelegateMethod @end classB classADelegate classA ObjOfclassA classA alloc init ObjOfclassA.delegate self while push later here we have taken the pointer.. classA ObjOfclassA classA alloc init ObjOfclassA.delegate self while push later here we have taken the pointer of classB self to classA and stored in delegate variable of classA. so from classA we can call the function in classB push classA.. pointer of classB self to classA and stored in delegate variable of classA. so from classA we can call the function in classB push classA from here. void DelegateMethod nslog @ i am rithik from India classA id classADelegate delegate void viewdidload..