Skip to content

Methods with percentages

Compare
Choose a tag to compare
@lucdion lucdion released this 03 Jun 10:42
· 913 commits to master since this release

It is now possible to user ‘%’ characters.
ex:
view.pin.top().left(25%).width(25%).height(100%)

  • width(_ percent: Percent)
  • height(_ percent: Percent)
  • size(_ percent: Percent)
  • top(_ percent: Percent)
  • left(_ percent: Percent)
  • bottom(_ percent: Percent)
  • right(_ percent: Percent)
  • hCenter(_ percent: Percent)
  • vCenter(_ percent: Percent)

Plus:

  • size(_ sideLength: CGFloat)
  • Implement hCenter() & vCenter()
  • Implement margin(_ vertical: CGFloat, _ horizontal: CGFloat) & margin(_ top: CGFloat, _ horizontal: CGFloat, _ bottom: CGFloat)
  • Add more unit tests
  • Removed few forced optionals
  • Removed deprecated UIView+PinLayout extension.