• 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: Aligning baseline of NS controls
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Aligning baseline of NS controls


  • Subject: Re: Aligning baseline of NS controls
  • From: Ken Thomases <email@hidden>
  • Date: Thu, 10 Jul 2014 10:34:15 -0500

On Jul 10, 2014, at 9:03 AM, Keary Suska <email@hidden> wrote:

> On Jul 10, 2014, at 2:02 AM, Aandi Inston wrote:
>
>> Suppose a dialog is to contain a line with multiple controls like
>>
>> [ ] Add ________ seconds [before/after]

>> Each of these controls contains text, and the aim here is to align the text
>> so it does not jump up and down - to align the text baseline.
>
> Umm, Auto Layout? You can easily align elements by baseline...

And even if you don't use auto layout as such, there were methods introduced to support it that you can use anyway.  In particular, -[NSView alignmentRectForFrame:] to get the alignment rectangle and -baselineOffsetFromBottom to find the baseline relative to that alignment rectangle.

Regards,
Ken


_______________________________________________

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: 
 >Aligning baseline of NS controls (From: Aandi Inston <email@hidden>)
 >Re: Aligning baseline of NS controls (From: Keary Suska <email@hidden>)

  • Prev by Date: Re: View-based outline view problem
  • Next by Date: Re: View-based outline view problem
  • Previous by thread: Re: Aligning baseline of NS controls
  • Next by thread: Master-Detail in iOS
  • Index(es):
    • Date
    • Thread