objective c - How to get instance of UIView subclass from app controller -
If I subclassed a UIView from the interface builder, and now there is a frequency of subclass that is in my App Controller, I How will this reference (no subclass and UIView) be found?
One way to do this is to:
- Interface from the library Drag a UIUI object from the Builder (IB) to your Neck window (window that shows all objects in the Nib). Change from the UIView to the new object in the object sub-section (Shift-Control-i).
-
Create an outlet in your App Controller header file:
IBOutlet MySubViewClass * MyView;
-
Connect the MyView outlet with the objects created in step in IV. You can see the object by right-clicking-a-dragging the object and clicking on the mineview in the window. Opting out which pops up.
Comments
Post a Comment