I'm new to OOP, having been a procedural programmer for many years. I'm learning iOS development in Objective-C and could use some clarity on when and how objects and properties are used.
Say I have a view controller, MyViewController. Within that is a UIView, MyView, with a property, viewProperty.
How do I reference viewProperty from within MyViewController? My hunch is that I need to instantiate an instance of MyView, say:
and then reference instanceView.viewProperty. But without having instantiated a MyView at all, a MyView view shows up in MyViewController when I run the iPhone Simulator. Is that because my XIB file implicitly instantiates an instance of MyView? If so, how do I reference that instance in code? If I have to instantiate a MyView instance within MyViewController, which method(s) should contain the declaration, and why?
I hope I explained my foggy perceptions adequately for someone to clear things up for me. Apologies if I'm not making sense, but I feel like if someone just connects the dots for me I'm almost there.