Communicating between classes set up in nib, in code?
- by cannyboy
A beginner's question:
If, in your nib, you have the File's Owner linked to the ViewController class, and you also have a NSObject-derived class, how do you communicate between the ViewController class and the NSObject class within code?
For instance, suppose ScientificCalculatorView.xib looks like this
File's Owner (class: ScientificCalculatorViewController)
FirstResponder
View
Calculator (an object that has been linked to the Calculator class)
Obviously, I'd want Calculator to be reusable, so it could be used with a NormalCalculatorViewController or something like that. So that UI and the calculator code are separate. Does Calculator even need to be in the nib?
It's a beginners question, but I'm just trying to get my head around it.