Den 18:09 21. mars 2012 skrev Charles Srstka
<[email protected]> 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 protected])

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to