3

When I set my UIView in an interface builder to be equal widths to the super view it sets it at 600.

When I launch my app and print out the width of the UIView it says 600.

The screen width is only 320.

How can I get the UIView to be the width of the screen instead?

Thanks

Aggressor
  • 13,323
  • 24
  • 103
  • 182
  • 2
    Print out in viewDidAppear, use size class and constraint to set the width to its superview's width. – gabbler Oct 10 '14 at 13:52
  • Brilliant thank you! I was calling it in the viewDidLoad but I guess it hasnt been added to the hierarchy and hence not sized correctly. Thank you! – Aggressor Oct 10 '14 at 15:13

0 Answers0