Skip to content

add completion handler to showWithDelay() #50

@fetzig

Description

@fetzig

Suggest an additional param for EZLoadingActivity.showWithDelay().

completion callback/handler makes this method far more useful:

@discardableResult
public static func showWithDelay(_ text: String, disableUI: Bool, seconds: Double, completion: (() -> Void)? = nil) -> Bool {
    let showValue = show(text, disableUI: disableUI)
    delay(seconds) { () -> () in
        _ = hide(true, animated: false)
       completion?()
    }
    return showValue
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions