Skip to content

Add support for system spacing in iOS 11 and High Sierra #44

Open
@ZevEisenberg

Description

@ZevEisenberg

From the iOS 11 release notes:

Updated NSLayoutXAxisAnchor and NSLayoutYAxisAnchor to provide factory methods that create constraints using the system spacing between two anchors. Previously the only way to create such a constraint was with the dash (-) in the Visual Format Language.

Anchorage should add some kind of syntactic sugar or named CGFloat value like .system or something. The new API looks like this:

func constraintEqualToSystemSpacingAfter(NSLayoutXAxisAnchor, multiplier: CGFloat)

It might be nice to use it like this:

view2.trailingAnchor == view1.leadingAnchor + SystemSpacing()

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions