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: Wed, 21 Mar 2012 18:52:12 +0100
Den 18:09 21. mars 2012 skrev Charles Srstka
<email@hidden> følgende:
> On Mar 21, 2012, at 8:54 AM, Per Bull Holmen wrote:
>
> I am old school and know nothing about constraints, but given your
> descriptions, perhaps you can tie the document view size to the clip
> view size (which is also called content view) instead of the scroll
> view size?
>
>
> Actually, what I’m doing currently is to tie it to the clipview’s
> -documentVisibleRect.size, which is working quite well.
>
> Charles
But from how I understand what you've written, you are constantly
listening for frame changes from the scroll view, and setting new
constraints each time. I don't know how the constraints system works,
but I understood it the way that you wouldn't have to do this if the
scroll view's size was equal to the visible proportion of the document
view. Therefore I was wondering how come you didn't set the
constraints to follow the clip view instead of the scroll view,
because I believe the clip view's frame will always have the same size
as the visible portion of the document view. I think that would be
much cleaner. I haven't done any programming with constraints, so I
don't know if this will work.
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