Contents

union(_:edges:)

Gets a new value that merges the spacing preferences of another spacing instance with this instance for a specified set of edges.

Declaration

func union(_ other: ViewSpacing, edges: Edge.Set = .all) -> ViewSpacing

Parameters

  • other:

    Another spacing preferences instance to merge with this one.

  • edges:

    The edges to merge. Edges that you don’t specify are unchanged after the method completes.

Return Value

A new view spacing preferences instance with the merged values.

Discussion

This method behaves like formUnion(_:edges:), except that it creates a copy of the original spacing preferences instance before merging, leaving the original instance unmodified.

See Also

Merging spacing instances