• 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: Richard Somers <email@hidden>
  • Date: Tue, 20 Mar 2012 07:16:05 -0600

On Mar 19, 2012, at 10:20 PM, Charles Srstka wrote:

> As everyone knows, if you have a view with a bunch of subviews and you’ve got NSLayoutConstraints set up for everything, in many cases you might end up with a minimum or maximum size for the view beyond which the constraints are impossible to satisfy, and if you try to resize the view outside these bounds either in IB or in the actual program (if the view is the content view of a resizable window, for example), the resizing will simply stop at those boundaries.

I have worked with constraints in another system and one of the things I learned is that a collection of constraints must be "exercised" or driven from one extreme to the other in order to have confidence that they are correct. If you have a min or max size condition for the view beyond which the constraints are impossible to satisfy, but this in not what you want, then you need to change the constraints so that you get what you want under all conditions. The constraint engine is mathematically correct and does not lie. So if there is a problem, it is in how you are specifying and arranging the constraints or in the number of constraints you have.

--Richard


_______________________________________________

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: Charles Srstka <email@hidden>
References: 
 >How to get max size of view according to constraints? (From: Charles Srstka <email@hidden>)

  • Prev by Date: Re: The use of UIActionSheet mysteriously disables our app with a white screen after memory warning.
  • Next by Date: Re: How to get max size of view according to constraints?
  • Previous by thread: 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