Functions

The following functions are available globally.

  • Equality operator for PlaceInfos

    Declaration

    Swift

    func == (lhs: PlaceInfo, rhs: PlaceInfo) -> Bool

    Parameters

    lhs

    A PlaceInfo

    rhs

    Another PlaceInfo

    Return Value

    Whether they are equivalent

  • getMediaFromImagePickerInfo

    Declaration

    Swift

    func getMediaFromImagePickerInfo(_ info: [String : Any]) -> Media?

    Parameters

    info

    Dictionary

  • getMediaFromURL

    Declaration

    Swift

    func getMediaFromURL(_ url: URL) -> Media?

    Parameters

    url

    URL

  • push

    Declaration

    Swift

    func push<Item>(_ item: Item?) -> (((Item) -> Void) -> Void)?

    Parameters

    item

    Item

  • Throw error on unwrapping optional

    Throws

    UnwrapError if nil

    Declaration

    Swift

    func unwrap<T>(_ optional: @autoclosure () -> T?,
                   file: StaticString = #file,
                   line: UInt = #line) throws -> T

    Parameters

    optional

    The Optional to unwrap

    file

    Diagnostic filename

    line

    Diagnostic line number

    Return Value

    Wrapped value