EZLoadingActivity icon indicating copy to clipboard operation
EZLoadingActivity copied to clipboard

add completion handler to showWithDelay()

Open fetzig opened this issue 6 years ago • 0 comments

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
}

fetzig avatar Feb 14 '19 09:02 fetzig