I'm still new to xcode / iOS and have the following problem:
in order to display some mobile debug information, I have a UIview added/connected as outlet-property to one of my Viewcontroller. This view is a custom subclass of UIview. Now I addeddd some UIlabels as sub views to this view and want to drag the outlet connections from these labels to my customUIview.h file in order to have these labels accessible as properties of my custom UIview class (no need to access them directly from the view Controller).
Problem is that the interface builder (I'm using Storyboards/ xcode4.3) does not make the trick. I can connect the outlets to the ViewControllerClass.h but not to my sub view's .h file. Can anyone point out where the problem is?
Using a custom view in storyboardsOpen up your story board and drag a View (colored orange below for visibility) from the Object Library into your view controller. Set the view's custom class to your custom view's class. Create an outlet for the custom view in your view controller.
In the XIB, I changed the "File's Owner" class to SomeView (in the identity inspector). I created a UIView outlet in SomeView. swift, linking it to the top level view in the XIB file (named it "view" for convenience). I then added other outlets to other controls in the XIB file as needed.
Just solved the problem. After typing the property outlet declarations manually in the customview.h file I could ctrl-drag-connect them from there to their corresponding UIlabel objects in the interfacebuilder. Works only in this direction!
Thanks anyway
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With