LayoutValueRepresentable
public protocol LayoutValueRepresentable
Type which can reprent value, Mostly used with autolayouts, but not limited to it. Contains some utility methods to create margins, insets etc.
-
Raw value
Declaration
Swift
var rawValue: CGFloat { get }
-
pixelExtension methodOne pixel value based on device scale
Declaration
Swift
public static var pixel: CGFloat { get }
-
by(_:)Extension methodmultiply value with rawValue.
Declaration
Swift
public func by(_ multiplier: CGFloat) -> CGFloat -
edgeInsets()Extension methodedgeInsets with values.
Declaration
Swift
public func edgeInsets() -> UIEdgeInsets -
hRect(_:)Extension methodcreate horizontal rect with rawValue.
Declaration
Swift
public func hRect(_ value: Self) -> UIEdgeInsets -
vRect(_:)Extension methodcreate vertical rect with rawValue.
Declaration
Swift
public func vRect(_ value: Self) -> UIEdgeInsets
View on GitHub
Install in Dash
LayoutValueRepresentable Protocol Reference