Functions
The following functions are available globally.
-
Undocumented
Declaration
Swift
public func |><A, B>(x: A, f: (A) -> B) -> B -
Undocumented
Declaration
Swift
public func >>> <A, B, C>(f: @escaping (A) -> B, g: @escaping (B) -> C) -> (A) -> C -
Undocumented
Declaration
Swift
public func <> <A>(f: @escaping (A) -> A, g: @escaping (A) -> A) -> (A) -> A -
Compose two functions from one type to Void. functions will be applied in order internally.
Declaration
Swift
public func <> <A: AnyObject>(f: @escaping (A) -> Void, g: @escaping (A) -> Void) -> (A) -> VoidParameters
ffirst function
gsecond function
-
Compose two functions from one type (inout) to Void. functions will be applied in order internally.
Declaration
Swift
public func <> <A>(f: @escaping (inout A) -> Void, g: @escaping (inout A) -> Void) -> (inout A) -> VoidParameters
ffirst function
gsecond function
-
Style border of view
Declaration
Swift
public func border(color: UIColor, width: CGFloat) -> (UIView) -> VoidParameters
colorborder color
widthwidth of border
Return Value
Styling function
-
Style corner of a view
Declaration
Swift
public func corner(radius: CGFloat) -> (UIView) -> VoidParameters
radiusradius of corner
-
Style background of view
Declaration
Swift
public func background(color: UIColor) -> (UIView) -> VoidParameters
colorbackground color of view
Return Value
Styling function
-
Creates a controller that represents a specific device, orientation with specific traits.
Declaration
Swift
public func playgroundWrapper(child: UIViewController, device: Device = .phone4_7inch, orientation: Orientation = .portrait, contentSizeCategory: UIContentSizeCategory = .large, additionalTraits: UITraitCollection = .init()) -> UIViewControllerParameters
deviceThe device the controller should represent.
orientationThe orientation of the device.
childAn optional controller to put inside the parent controller. If omitted a blank controller will be used.
additionalTraitsAn optional set of traits that will also be applied. Traits in this collection will trump any traits derived from the device/orientation comboe specified.
Return Value
Two controllers: a root controller that can be set to the playground’s live view, and a content controller which should have UI elements added to it
View on GitHub
Functions Reference