Re: Custom NSViews and the view hiarchy
Re: Custom NSViews and the view hiarchy
- Subject: Re: Custom NSViews and the view hiarchy
- From: "Cathy Shive" <email@hidden>
- Date: Wed, 25 Jul 2007 14:23:05 -0400
When you make your view a subview of a scroll view in IB, it becomes
the scroll view's document view. You'll want to configure how your
view resizes inside of the scroll view. In IB double click inside the
scroll view so that you are inspecting your view and set it's
autoresizing options in the inspector panel. Then you'll want to do
the same for the NSScrollView so that it resizes the way you want
within the layout of your window.
There's a decent programming guide for scroll views:
http://developer.apple.com/documentation/Cocoa/Conceptual/NSScrollViewGuide/index.html#//apple_ref/doc/uid/TP40003221
On 7/25/07, Francis Derive <email@hidden> wrote:
Do you know you can better view objects hierarchy in IB by clicking
the second little button from the top right edge of the nib window ?
On Jul 25, 2007, at 7:16 PM, Bruce Johnson wrote:
> I have a custom NSView which is a subclass of another custom NSView.
>
> Then in Interface Builder, I made them subviews(?) of a
> scrollview. Now I
> know that there are a few other views mixed in (NSClipView,
> documentView,
> etc) The order of which I am not certain.
>
> My question is:
> I need constrain the porportions of the view as the window is
> resized, so
> which view do I constrain?
>
> I'm not sure of the hiarchy
>
> NSView
> --
> --
> a custion View
> my subclass of a custom view
> --
> --
> ScrollView
>
> any insight would be very much appreciated.
> --
> ----
> Bruce Johnson
> email@hidden
> _______________________________________________
>
> 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:
> 40mac.com
>
> This email sent to email@hidden
_______________________________________________
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
_______________________________________________
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