PureLayout/PureLayout

Expose NSLayoutAttributeFirstBaseline and NSLayoutAttributeLastBaseline for OS X 10.11+

Open

#84 opened on Aug 24, 2015

View on GitHub
 (2 comments) (0 reactions) (0 assignees)Objective-C (7,604 stars) (731 forks)batch import
enhancementhelp wanted

Description

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 :)

Contributor guide