• 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
Trouble with initial position of NSScrollView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Trouble with initial position of NSScrollView


  • Subject: Trouble with initial position of NSScrollView
  • From: Oftenwrong Soong <email@hidden>
  • Date: Mon, 9 Nov 2009 12:10:07 -0800 (PST)

Hi all,

My app's UI was swapping views into a NSBox (a la Hillegass's book). Now I decided to replace the NSBox with a NSScrollView. No big difference there. I only made three changes: In IB, I got rid of the NSBox and dropped a NSScrollView in its place. In my document controller class, I modified the IBOutlet, which I call everChangingView, to point to a NSScrollView instead of a NSBox. Finally, in the method that swaps the view, I call [everChangingView setDocumentView:v] instead of [everChangingView setContentView:v].

The views do swap into the NSScrollView as they should.

Unfortunately each time I swap a view, the vertical scrollbar goes all the way to the bottom, meaning that I have to manually scroll back up to bring the view into view.

What did I do wrong?

Thanks,
Soong




_______________________________________________

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: Trouble with initial position of NSScrollView
      • From: Graham Cox <email@hidden>
  • Prev by Date: Re: Cocoa Sounds
  • Next by Date: Re: iPhone: NSOperation and UITableVIews
  • Previous by thread: Re: Core Data Disable Undo
  • Next by thread: Re: Trouble with initial position of NSScrollView
  • Index(es):
    • Date
    • Thread