Re: How to get max size of view according to constraints?
Re: How to get max size of view according to constraints?
- Subject: Re: How to get max size of view according to constraints?
- From: Per Bull Holmen <email@hidden>
- Date: Thu, 22 Mar 2012 01:35:53 +0100
Den 19:26 21. mars 2012 skrev Charles Srstka
<email@hidden> følgende:
> It seems to be the same in testing; however, is it guaranteed to be that way
> anywhere in the documentation? The fact that NSClipView actually has a
> separate property named -documentVisibleRect seems to imply that it isn’t.
The -documentVisibleRect property gives the visible portion of the
document in the document view's OWN coordinate system. The main
difference in most cases will be the origin, which will be different
from the frame of the clip view because of scrolling. If the document
view's bounds are set in such a way that the drawing is magnified,
that will also affect the size of -documentVisibleRect, because this
rect is given in the document view's own coordinate system, while a
view's frame is given in the super view's coordinate system. The whole
purpose of the clip view is to clip the document view to show only the
visible portion. Therefore, its size will always be equal to the
visible prtion of the document view. It serves no purpose outside that
area. It would be a strange decision if Apple should ever change that
in the future, to let it serve as an invisible layer above other
views, in addition to clipping the document view? I'd consider that
bizarre, but I don't know if it says so explicitly anywhere in the
docs.
Per
_______________________________________________
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