• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: ScrollView Programming
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ScrollView Programming


  • Subject: Re: ScrollView Programming
  • From: Jeffrey Walton <email@hidden>
  • Date: Wed, 06 Apr 2011 04:53:19 -0400

On Wed, Apr 6, 2011 at 2:47 AM, Quincey Morris
<email@hidden> wrote:
> On Apr 5, 2011, at 23:28, Quincey Morris wrote:
>
>> 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.
>
> Gah! Said that backwards. If you do the above, it will of course never scroll because it will always get resized to the size of the clip view. It needs to be *bigger* than the clip view for scrolling to happen.
>
> If it's just a view full of controls, it shouldn't be set to resize automatically at all.
>
OK. Thanks Quincey. I must be one of the dullest tools in the shed. I
can't seem to get this to work following both the documentation and
your advice. Here is what I have:

+ File Owner
+ First Responder
+ Scroll View
    + View
      + Control 1
      + Control 2
      + ...

Connections:
  file's owner, scroll view -> scroll view
  file's owner, view -> view
  scroll view delegate -> nil (file owner does not help)

Scroll View:
  Scroll View Connection: file's owner
  Scroll View Delegate: not connected (connected did not help)
  Size: 320 x 431 (Tab Bar)
  Clip subviews: off
  Autoresize subviews: on
  Outer size springs: on
  Inner size springs: unable to set (disabled?)

View:
  View Connection: file's owner
  Size: 320 x 608
  Clip subviews: off
  Autoresize subviews: off
  Outer size springs: off
  Inner size springs: off

The scroll view, view, and controls are *all* outlets. All are
verified to be non-nil in ViewDidLoad via Asserts. No assert fires.

Any ideas? I'd like to wrap this up before day three is written off as
a loss.....

Jeff
_______________________________________________

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

  • Follow-Ups:
    • Re: ScrollView Programming
      • From: Quincey Morris <email@hidden>
References: 
 >ScrollView Programming (From: Jeffrey Walton <email@hidden>)
 >Re: ScrollView Programming (From: Quincey Morris <email@hidden>)
 >Re: ScrollView Programming (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: diable localization
  • Next by Date: Re: ScrollView Programming
  • Previous by thread: Re: ScrollView Programming
  • Next by thread: Re: ScrollView Programming
  • Index(es):
    • Date
    • Thread