TZStackView
TZStackView copied to clipboard
Fixup TZStackViewAlignment
This PR updates TZStackViewAlignment to match UIStackViewAlignment and has some minor updates for iOS deprecations / consistency in documentation & test project.
Background
We noticed some discrepancies between the functionality of iOS 9.x UIStackView and iOS 8.x TZStackView. Specifically, we noticed that the following did not work as expected:
stack.alignment = UIStackViewAlignmentCenter;
Things discovered:
- TZStackViewAlignment had a different order of enum values than UIStackViewAlignment. This mismatch meant that the above assignment didn't go as planned.
- The code was using deprecated methods
addConstraint()/addConstraints() - The code was using other methods that required 8.x support.
- The xcodeproj was set to deployment target of 8.0, but the README.md claimed 7.x support.
These were all brought to consistency in this PR, along with using NSLayoutConstraint.activateConstraints()
Please see #63 instead of this PR if iOS 7 support is important.