Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Gimp/libgimpwidgets/   (Gimp Bildeditor Version 3.2.0©)  Datei vom 14.2.2026 mit Größe 6 kB image not shown  

Impressum ProgressHUD.swift   Sprache: JAVA

 

import MBProgressHUD

struct ProgressHUD {
    typealias Action = () -> Void
    
    private(set) var hide: Action?
    private(set) var show: Action?
    
    private init() { }
    
    static func make(label: String?) -> ProgressHUD {
        make(
            label: label,
            on: MainActor.assumeIsolated {
                SharedAppProvider.currentTopViewController
            }
        )
    }
    
    static func make(label: String?, on viewController: UIViewController?) -> ProgressHUD {
        ProgressHUD().then {
            guard let viewController, let view = viewController.view else {
                return
            }
            
            $0.hide = {
                _ = MBProgressHUD.hide(for: view, animated: true)
            }
            
            $0.show = {
                _ = MBProgressHUD.showAdded(to: view, animated: true).then {
                    $0.label.text = label
                }
            }
        }
    }
}

// MARK: - Then

extension ProgressHUD: Then { }

Messung
CHZG
849410092

¤ Dauer der Verarbeitung: 0.101 Sekunden  ¤

*Bot Zugriff