• 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: Arrgh IB constraints
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Arrgh IB constraints


  • Subject: Re: Arrgh IB constraints
  • From: Rick Mann <email@hidden>
  • Date: Sun, 08 Jul 2012 19:48:29 -0700

On Jul 8, 2012, at 19:32 , Charles Srstka wrote:

> You have to get used to the new way of thinking about things. No height constraint is literally telling the system, “I don’t care how high you make this view. Make it 1 px high, make it 1,000,000 px high, it’s all the same to me.”

So, I don't care, other than to say, "don't make it smaller than x" (that is, a >= height constraint). But aside from that I want it to satisfy the other constraint, which is to make it as big as the parent view, minus some margin.

Given that the parent view can resize, an equal height constraint is not appropriate. But for the initial layout, assuming the constraints are not in conflict, the sizes specified in IB are an excellent starting point (BTW, IB should not allow you to add constraints that don't match the layout as it stands in IB).

So, the way I see it, if I don't specify a constraint, it should still lay out the initial views based on the sizes (and positions) specified in IB, and then from there follow the constraints when resizing. This would not prevent it from getting too small, and is much more elegant than adding a constraint specifying a particular hight, which then requires mucking with priorities.

> With no height constraint, the system doesn’t know how it should look at startup, and therefore that picture with the bottom pane being half the window’s height is just as legit as the bottom text view being one line high.

On the contrary, it has a perfectly reasonable size at startup. Assuming, of course, that IB didn't allow me to add conflicting constraints.

--
Rick


_______________________________________________

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: Arrgh IB constraints
      • From: Charles Srstka <email@hidden>
References: 
 >Arrgh IB constraints (From: Rick Mann <email@hidden>)
 >Re: Arrgh IB constraints (From: Todd Heberlein <email@hidden>)
 >Re: Arrgh IB constraints (From: Charles Srstka <email@hidden>)
 >Re: Arrgh IB constraints (From: Rick Mann <email@hidden>)
 >Re: Arrgh IB constraints (From: Rick Mann <email@hidden>)
 >Re: Arrgh IB constraints (From: Charles Srstka <email@hidden>)

  • Prev by Date: Re: Arrgh IB constraints
  • Next by Date: Re: Arrgh IB constraints
  • Previous by thread: Re: Arrgh IB constraints
  • Next by thread: Re: Arrgh IB constraints
  • Index(es):
    • Date
    • Thread