Tuesday, 20 August 2013

Assessing methods or properties from a Class

Assessing methods or properties from a Class

I can't google the answer to this question maybe because I don't know the
right term to use for search.
I have a class Class A and within Class A I create an instance of Class B.
Class A and B is not the parent child relationship. I need to call some
methods from Class A when something happens to Class B. How can this b
done?
A simple example to visualise this could be I have a Class A inherited
from UIView and created a Button_B to the UIView. If I tap the button, I
need a method_C from Class A to be called.
Something like: [parent.ButtonB method_C]
How can this be done?
Thanks!

No comments:

Post a Comment