views:

38

answers:

1

I am having trouble laying out scrollable view in interface builder. A screen shot of my layout is here. As you can see the layout is pretty simple. The UIImageView above the text will not have a specific height. It may be 100px high or 300px high. This is why the view is scrollable. I am experiencing two problems with this layout:

1) For some reason the image will sit behind the text instead of pushing it down. Take a look here.

2) The obvious other problem is that the upper most UIImage and UILabel are getting pushed up off of the screen. I am thinking this has to do with the UIScrollView but I haven't been able to figure out why.

Thanks!

+1  A: 

(1) This is expected behavior. Views aren't physical objects. They can't push each other around. Their only relationship to one another is their top to bottom order of display. You'll need to manually move the text field to accommodate the changing size of the imageview.

(2) I don't think the other two views are being "pushed" off the screen. See (1). Instead, I think the contentOffset of your scrollview is changing to scroll them off the top of the screen. Again, you'll have to manage the scrolling related to the size of the imageview.

TechZen