Storyboard editor layout confusion

Posted by drew on Stack Overflow See other posts from Stack Overflow or by drew
Published on 2012-07-05T15:14:14Z Indexed on 2012/07/05 15:15 UTC
Read the original article Hit count: 355

Filed under:
|
|
|

I am having layout problems with the storyboard editor with a fairly simple screen. I have a UIViewController to which I have added a 320x440 UIScrollView at 0,0 followed by a 320x20 UIProgressBar at 0,440. It looks fine in Storyboard editor. I'm not entirely sure how the 20 pixel status bar at the top of the screen is accommodated given the CGRect frame coordinates that Storyboard calculates.

On loading ( in -(void)viewDidLoad ), the UIScrollView frame seems to be set to 320x460 pixels at 0,0 but the UIProgressBar is still 320x20 at 0,440.

When I add subviews to the UIScrollView, (UIImageViews in particular), they get stretched and get clipped on the screen because although the UIScrollView thinks it is 460 pixels high, it only has 440 pixels of screen to display in.

Can anyone point me to a solution?

Thanks

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about ios