Re: ScrollView Programming
Re: ScrollView Programming
- Subject: Re: ScrollView Programming
- From: Quincey Morris <email@hidden>
- Date: Tue, 05 Apr 2011 23:28:19 -0700
On Apr 5, 2011, at 22:54, Jeffrey Walton wrote:
> After following Steps 1 - 4, what is the layout supposed to look like under IB?
>
> + File Owner
> + First Responder
> + View
> + Scroll View
> + Control 1
> + Control 2
> + ...
>
> Or
>
> + File Owner
> + First Responder
> + Scroll View
> + View
> + Control 1
> + Control 2
> + ...
The second, not the first. Note that IB lies to you -- this isn't the view hierarchy. The scroll view is the parent of 3 views: the clip view view, and the 2 scrollers. The clip view is the parent of the "document" view***, which is the (single) view that actually contains your content.
> When I get to step 3 and [loosely] follow "Choose Layout > Make
> subviews of > Scroll View", I get the first layout (View is parent of
> ScrollView). But no scrolling.
Almost certainly your problem is that you failed to set the autoresizing springs correctly for the "document" view. In the simplest case, it should be anchored on all 4 sides, and be stretchy in both directions.
*** That's what the documentation calls the scroll view's content view. It has nothing to do with NSDocument, except that perhaps originally it was shorthand for "document contents" view. I think the clip view has another name in the documentation too, but I've forgotten what it is.
_______________________________________________
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