SwifterSwift v1.3.4 Release Notes

  • UIViewExtensions:

    • func addConstraints(withFormat: String, views: UIView...): Add Visual Format constraints
    • func fillToSuperview(): Anchor all sides of the view into it's superview
    • func anchor(top: NSLayoutYAxisAnchor?, left: NSLayoutXAxisAnchor?, bottom: NSLayoutYAxisAnchor?, right: NSLayoutXAxisAnchor?, topConstant: CGFloat, leftConstant: CGFloat, bottomConstant: CGFloat, rightConstant: CGFloat, widthConstant: CGFloat, heightConstant: CGFloat) -> [NSLayoutConstraint]: Add anchors from any side of the current view into the specified anchors and returns the newly added constraints.
    • func anchorCenterXToSuperview(withConstant: CGFloat): Anchor center X into current view's superview with a constant margin value.
    • anchorCenterYToSuperview(constant: CGFloat): Anchor center Y into current view's superview with a constant margin value.
    • func anchorCenterSuperview(): Anchor center X and Y into current view's superview

    IntExtensions:

    • kFormatted: String formatted for values over ±1000 (example: 1k, -2k, 100k, 1kk, -5kk..)

    Thanks to Jonathan Bijos & zzjzz9266a for adding new extensions.