PureLayout
PureLayout copied to clipboard
Expose NSLayoutAttributeFirstBaseline and NSLayoutAttributeLastBaseline for OS X 10.11+
Apple has brought the following two layout attributes (previously iOS 8.0+ only) to OS X as of 10.11:
NSLayoutAttributeFirstBaselineNSLayoutAttributeLastBaseline
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
ALAxisFirstBaselineattribute to include OS X 10.11 or higher, instead of just iOS 8.0 or higher (make sure to perform a global search forALAxisFirstBaselineandALAttributeFirstBaselineto 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 :)
I'll try to submit a PR later
It seems there's no way to align the first baseline of one view to the last baseline of another.