Spacer
public struct Spacer : Element
An element that does not display anything (it has neither children or a view).
Spacer
simply takes up a specified amount of space within a layout.
-
The size that this spacer will take in a layout.
Declaration
Swift
public var size: CGSize
-
Initializes a new spacer with the given size.
Declaration
Swift
public init(size: CGSize)
-
Initializes a new spacer with the given width and height.
Declaration
Swift
public init(width: CGFloat = 0.0, height: CGFloat = 0.0)
-
Initializes a new spacer with the given value for the width and height.
Declaration
Swift
public init(_ value: CGFloat)
-
Declaration
Swift
public var content: ElementContent { get }
-
Declaration
Swift
public func backingViewDescription(with context: ViewDescriptionContext) -> ViewDescription?