Re: how to stack two views vertically (and resize properly)
Re: how to stack two views vertically (and resize properly)
- Subject: Re: how to stack two views vertically (and resize properly)
- From: Kyle Sluder <email@hidden>
- Date: Thu, 21 Oct 2010 22:22:54 -0700
On Thu, Oct 21, 2010 at 10:10 PM, Wayne Shao <email@hidden> wrote:
> Hi,
>
> I have this layout: A container view C, with two sub-views in vertical
> order: a Box B on the top, and a WebView W at the bottom.
>
> Box B
> -------------------
> WebView W
>
>
> In IB, I set the following resize property:
>
> B: fixed top edge and fix height, take whole width of the parent
> W: fixed bottom, fix top position, let it take the full size of both x and y
> direction of the parent.
>
> The problem: When the parent view C is resized to a very small height, the
> WebView W's top edge goes over the Box on the top, making the Box invisible.
> When C is resize to full height, the W still covers the Box.
> I do not want the top edge of W to move.
>
> The question is: how do I let the WebView W's top edge stick with B's
> bottom edge? (B fixed height, and W - variable height upon resize)
It sounds like you're letting B get squished to zero height.
Set a minimum height for your window that prohibits the layout from
getting screwed up.
--Kyle Sluder
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden