• 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: How to get max size of view according to constraints?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get max size of view according to constraints?


  • Subject: Re: How to get max size of view according to constraints?
  • From: Charles Srstka <email@hidden>
  • Date: Wed, 21 Mar 2012 13:26:31 -0500

On Mar 21, 2012, at 12:52 PM, Per Bull Holmen wrote:

> 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.

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.

Charles

_______________________________________________

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: How to get max size of view according to constraints?
      • From: Per Bull Holmen <email@hidden>
References: 
 >How to get max size of view according to constraints? (From: Charles Srstka <email@hidden>)
 >Re: How to get max size of view according to constraints? (From: Richard Somers <email@hidden>)
 >Re: How to get max size of view according to constraints? (From: Charles Srstka <email@hidden>)
 >Re: How to get max size of view according to constraints? (From: Peter Ammon <email@hidden>)
 >Re: How to get max size of view according to constraints? (From: Charles Srstka <email@hidden>)
 >Re: How to get max size of view according to constraints? (From: Per Bull Holmen <email@hidden>)
 >Re: How to get max size of view according to constraints? (From: Charles Srstka <email@hidden>)
 >Re: How to get max size of view according to constraints? (From: Per Bull Holmen <email@hidden>)

  • Prev by Date: Re: asynchronous nsurlconnection in nsoperation
  • Next by Date: Re: Missing header files/folders?
  • Previous by thread: Re: How to get max size of view according to constraints?
  • Next by thread: Re: How to get max size of view according to constraints?
  • Index(es):
    • Date
    • Thread