• 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: Help: NSScrollView is resizing its documentView down to (0, 0)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help: NSScrollView is resizing its documentView down to (0, 0)


  • Subject: Re: Help: NSScrollView is resizing its documentView down to (0, 0)
  • From: Uli Kusterer <email@hidden>
  • Date: Wed, 06 May 2015 17:36:53 +0200

On 05 May 2015, at 18:26, Jens Alfke <email@hidden> wrote:
> I haven't done much AppKit work in a while. Right now I have a small app where I'm trying to do something very simple: put a custom NSView in a window and make it scrollable. The view determines its own frame size based on the content it needs to display. So all I did was create a new window in IB, add an instance of my view, embed it in an NSScrollView, and set up default constraints for the scroll view so it'll track the window size.

 So you're not setting a constraint on the *document* view? How do you expect it to know how to constrain that view otherwise? Have you tried doing that? IIRC you need to implement updateConstraints to create proper constraints, or intrinsicContentSize, or maybe both.
_______________________________________________

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: Help: NSScrollView is resizing its documentView down to (0, 0)
      • From: Jens Alfke <email@hidden>
References: 
 >Help: NSScrollView is resizing its documentView down to (0, 0) (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Grabbing window - The contents of this window cannot be shared
  • Next by Date: Re: Help: NSScrollView is resizing its documentView down to (0, 0)
  • Previous by thread: Re: Help: NSScrollView is resizing its documentView down to (0, 0)
  • Next by thread: Re: Help: NSScrollView is resizing its documentView down to (0, 0)
  • Index(es):
    • Date
    • Thread