3

In storyboard I have a view with multiple views in it, in each view I have several subviews as well.

In one of my subviews I have 3 images and 3 labels. The labels have 0 width because I set that later in code. Everything worked fine with Xcode 5 but the labels are gone ever since the upgrade to Xcode 6.

When I try to access one of the labels from the code and NSLog it thats what I get:

<UILabel: 0x78fc6e40; frame = (0 0; 0 0); text = 'Apple iPhone 5S'; clipsToBounds = YES; opaque = NO; userInteractionEnabled = NO; layer = <_UILabelLayer: 0x78fc6f00>>

Thus, the label becomes 0 frame even though the storyboard set other wise.

I do not set the frame to be zero anywhere in the code.

If I set the width of the label to anything other than 0 I can see a frame other than 0 in code and see the labels but that creates a different behaviour then what I originally planned.

Michal Shatz
  • 1,416
  • 2
  • 20
  • 31

0 Answers0