• 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: Autolayout Greedy Fill question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Autolayout Greedy Fill question


  • Subject: Re: Autolayout Greedy Fill question
  • From: Luther Baker <email@hidden>
  • Date: Thu, 05 Dec 2013 00:48:57 -0600

Yes! Along with content edge insets and compression resistance, I'm now
getting the behavior I was looking for.

Thank you!



On Wed, Dec 4, 2013 at 5:37 PM, Charles Srstka <email@hidden>wrote:

> On Dec 4, 2013, at 5:27 PM, Luther Baker <email@hidden> wrote:
>
> > Given the following controls:
> >
> >    lastName = text field
> >    gender = segmented control
> >    picture = image view
> >
> > and given the following layout string:
> >
> >    @"V:|-[lastName]-[gender]-[picture]-|";
> >
> > I'd like to make sure that the lastName and gender controls are sized
> > tightly and allows the "picture" control fill all remaining vertical
> space.
> >
> > Obviously, I don't want to include explicit size values.
> >
> > In other words, I want sizing similar to old school [lastName sizeToFit]
> > and [gender sizeToFit] ... and then simply give the rest of the space to
> > 'picture'.
> >
> > This question goes for the H axis as well. I have a series of elements
> on a
> > line and I want to make sure that all of them are sized tightly save for
> > one which should greedily take up the rest of the space.
> >
> > Please note that for the most part, these are built in controls - IE: I'm
> > not overriding or implementing intrinsic size details.
>
> Give lastName and gender a high value for "Content Hugging Priority", and
> you should get the behavior you want.
>
> 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


References: 
 >Autolayout Greedy Fill question (From: Luther Baker <email@hidden>)
 >Re: Autolayout Greedy Fill question (From: Charles Srstka <email@hidden>)

  • Prev by Date: Re: Autolayout Greedy Fill question
  • Next by Date: WebView blocks User Interface
  • Previous by thread: Re: Autolayout Greedy Fill question
  • Next by thread: WebView blocks User Interface
  • Index(es):
    • Date
    • Thread