Horizontal
public struct Horizontal : RectBasedLayout, Extensible
extension Layout.Filling.Horizontal: ExpressibleByFloatLiteral, ExpressibleByIntegerLiteral
Undocumented
-
Undocumented
Declaration
Swift
public typealias Conformed = RectBasedLayout -
Performing layout of given rect inside available rect. Attention: Apply layout for view frame using code as layout(rect: &view.frame,…) has side effect and called setFrame method on view.
Parameters
rectRect for layout
sourceAvailable space for layout
-
Common method for create entity of this type with base behavior.
Declaration
Swift
public static func build(_ base: RectBasedLayout) -> Layout.Filling.HorizontalParameters
baseEntity implements required behavior
Return Value
Initialized entity
-
Undocumented
Declaration
Swift
public static var equal: Horizontal { get } -
Provides rect with width less or equal defined size depending on available space.
Declaration
Swift
public static func upTo(_ size: CGFloat) -> HorizontalParameters
sizeWidth limiter value.
Return Value
UpTo behavior typed with ‘Horizontal’
-
Provides rect with width value more or equal defined size depending on available space.
Declaration
Swift
public static func from(_ size: CGFloat) -> HorizontalParameters
sizeWidth limiter value
Return Value
From behavior typed with ‘Horizontal’
-
Provides rect with independed horizontal filling with fixed value
Declaration
Swift
public static func fixed(_ value: CGFloat) -> HorizontalParameters
valueValue of width
Return Value
Fixed behavior typed by ‘Horizontal’
-
Provides rect with width value scaled from width of source rect
Declaration
Swift
public static func scaled(_ scale: CGFloat) -> HorizontalParameters
scaleScale value.
Return Value
Scaled behavior typed by ‘Horizontal’
-
Provides rect, that width is smaller or larger than the source rect, with the same center point.
Declaration
Swift
public static func boxed(_ insets: CGFloat) -> HorizontalParameters
insetsValue to use for adjusting the source rectangle
Return Value
Boxed behavior typed by ‘Horizontal’
-
See description:
between(_ space: ClosedRange<CGFloat>)Declaration
Swift
public static func between(_ space: Range<CGFloat>) -> Horizontal -
Provides rect with width value between defined range depending on available space.
Declaration
Swift
public static func between(_ space: ClosedRange<CGFloat>) -> HorizontalParameters
spaceRange valid width values
Return Value
Between behavior typed with ‘Horizontal’
-
Declaration
Swift
public init(floatLiteral value: Float) -
Declaration
Swift
public init(integerLiteral value: Int)
Horizontal Structure Reference