Rule
public struct Rule : ProxyElement
A solid line, parallel to the x or y axis, with a fixed thickness but unconstrained in length, suitable for use as a separator.
-
Represents whether the rule is parallel to the x or y axis.
See moreDeclaration
Swift
public enum Orientation -
Represents the thickness of a rule in the direction perpendicular to its orientation.
See moreDeclaration
Swift
public enum Thickness -
Whether this rule is horizontal or vertical.
Declaration
Swift
public var orientation: Orientation -
The thickness of this rule in the direction perpendicular to its orientation.
Declaration
Swift
public var thickness: Thickness -
The color that the rule should be drawn.
Declaration
Swift
public var color: UIColor -
Initializes a Rule with the given properties.
Declaration
Swift
public init(orientation: Orientation, color: UIColor, thickness: Thickness = .hairline)Parameters
orientationWhether the rule is horizontal or vertical.
colorThe color that the rule should be drawn.
thicknessThe thickness of the rule in the direction perpendicular to its orientation. Defaults to a hairline thickness, meaning the thinnest possible line that can be drawn.
-
Declaration
Swift
public var elementRepresentation: Element { get }
View on GitHub
Rule Structure Reference