PureLayout icon indicating copy to clipboard operation
PureLayout copied to clipboard

Expose NSLayoutAttributeFirstBaseline and NSLayoutAttributeLastBaseline for OS X 10.11+

Open smileyborg opened this issue 10 years ago • 2 comments

Apple has brought the following two layout attributes (previously iOS 8.0+ only) to OS X as of 10.11:

  • NSLayoutAttributeFirstBaseline
  • NSLayoutAttributeLastBaseline

PureLayout has already been making the ALAxisLastBaseline attribute available for both platforms, because it is the same as ALAxisBaseline. However, PureLayout should make the ALAxisFirstBaseline attribute available to OS X. Doing this will involve:

  • Adding new macros to PureLayoutDefines.h to check for the MinBaseSDK (compile-time) and MinSysVer (runtime) OS X 10.11
  • Updating the existing macros protecting the ALAxisFirstBaseline attribute to include OS X 10.11 or higher, instead of just iOS 8.0 or higher (make sure to perform a global search for ALAxisFirstBaseline and ALAttributeFirstBaseline to find all of the places that need to be changed)

I'd like to leave this enhancement open for someone else to submit a PR :)

smileyborg avatar Aug 24 '15 21:08 smileyborg

I'll try to submit a PR later

openaphid avatar Aug 25 '15 07:08 openaphid

It seems there's no way to align the first baseline of one view to the last baseline of another.

jpmhouston avatar Feb 05 '16 21:02 jpmhouston