Re: Help visualizing something in IB
Re: Help visualizing something in IB
- Subject: Re: Help visualizing something in IB
- From: Brian Postow <email@hidden>
- Date: Wed, 10 Mar 2010 18:54:37 -0500
On Mar 10, 2010, at 6:36 PM, Quincey Morris wrote:
> On Mar 10, 2010, at 14:58, Brian Postow wrote:
>
>> Let say I have three views inside a scrollview with some other content. Top, buttons and image. buttons and image are both inside top. Top does NOT fill up the scrollview, however, buttons and image DO fill up top. Top has a maximum size determined at runtime, but it might not all be visible. The buttons view is above the image view. The buttons view should have a fixed height, but stretch width wise. The image view should fill up the topview and stretch in both directions.
>>
>> The question is what happens when the window with the scrollview resizes, and when the scrollview scrolls.
>>
>> I want whenever any part of the topview is visible, for the buttonview to be at the top of the visible portion of topView, and I want the imageview to take up whatever space (if any) is available below it. Even if I'm scrolling, or resizing the outer window.
>
> In the terms you have used, this makes no sense to me. You're saying (in effect) that you don't want topView to scroll, but you put it inside a scroll view, so it's going to scroll.
>
> It sounds a little bit like you want to move topView outside the scroll view, and use the window resizing delegate method to apportion space to topView and the scroll view according to some rules you devise. Or, use topView and the scroll view as the two panes of a split view, and write split view delegate code to handle the resizing.
Basically, I want the topView to scroll, but I always want to be able to see the buttonView. So if part of the topView isn't visible because it's been scrolled up, I want the buttonview at the top of the screen.
I think what I want is to have a sort of topView2 which is the intersection between topView and the contentView of the ScrollView, if that makes more sense...
>
>> I currently have in IB:
>> TopVew doesn't resize at all, locked top and left.
>> ButtonView resizes width but not height and is locked top left
>> ImageView resizes both,and is locked top bottom left. (probably adding right wouldn't matter)
>
> If topView doesn't resize at all, its subviews won't auto-resize, regardless of the options you set. Auto-resizing is dependent on the parent view, not on the window. But based on what you say below, topView clearly *is* resizing.
I'm manually resizing the topView as I resize the window.
>
> It's a known limitation of autoresizing that when the geometry collapses (by resizing the parent too small), you can't recover the original geometry even when you go back to the original size. It's sort of the layout analog to a divide-by-zero error in numerical computations.
>
Ok, so you're saying that I just lose there. ok.
In case the backstory helps, I'm writing a plugin for Mozilla. So, the outermost scrollwindow is the firefox "view", and then my plugin is within an HTML frame inside the page, so I'm scrolling around in the firefox window, and whenever my plugin is visible, I want the buttons at the top of it...
Brian Postow
Senior Software Engineer
Acordex Imaging Systems
_______________________________________________
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