Re: Help visualizing something in IB
Re: Help visualizing something in IB
- Subject: Re: Help visualizing something in IB
- From: Quincey Morris <email@hidden>
- Date: Wed, 10 Mar 2010 17:04:24 -0800
On Mar 10, 2010, at 15:54, Brian Postow wrote:
> 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...
It makes sense, but it doesn't have much precedent in terms of known Mac interfaces. Won't the visual effect be that the buttons appear to float over the window content some of the time? But with the weird side effect that the image below the buttons will get smaller as you scroll, until ... what? At some point does the image view get too small and disappear? When there's not enough vertical room to show the whole buttons, do they start scrolling out of the window?
It seems awfully ad-hoc, but anyway ...
> 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...
Yeah, that does help a bit.
If you must follow this approach, then I'd suggest you register to get frame-changed notifications from topView. That way, you'll know if it moved within the window, or if it was resized as a result of the window/enclosing view resizing. Also, turn off auto-resizing for subviews of topView.
When you get a notification, examine the geometry of the page, and re-layout your subviews appropriately (float the buttons, resize the image, etc). You'll then be able to avoid geometry collapse when the visible part of topView gets small.
That makes all your subview resizing manual, but it doesn't sound like auto-resizing is very useful here anyway.
_______________________________________________
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