Re: Autolayout frustrations with NSOutlineView [SOLVED, +follow-up question]
Re: Autolayout frustrations with NSOutlineView [SOLVED, +follow-up question]
- Subject: Re: Autolayout frustrations with NSOutlineView [SOLVED, +follow-up question]
- From: Quincey Morris <email@hidden>
- Date: Wed, 30 Jul 2014 00:20:57 -0700
On Jul 29, 2014, at 22:38 , Graham Cox <email@hidden> wrote:
> Unfortunately I don't think this will work for me if I understand what you're saying correctly, because my document content is in fact a drawing canvas that has a fixed size (that the user can set) but this is independent of the size and aspect ratio of the clip view. The canvas can be zoomed at will, and will often become smaller than the entire clip view, at least in one or other dimension (though both is common too).
What I’m suggesting is that the document view and the canvas are not the same thing, and the canvas need not even be a view. The canvas bounds and the document view bounds are not the same thing, in general:
— The document view bounds are forced to be at least as large as the clip bounds.
— The document view bounds are forced to be at least as large as the canvas bounds, in the canvas’s current scale.
Thus, if the canvas is smaller than the clip view (in either or both dimensions), it is simply drawn within the document view. This can be achieved either by making the canvas a subview of the document view, or by drawing in the document view itself but limiting the drawing to the bounds of the canvas, in the dimensions that the canvas is smaller.
_______________________________________________
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