mirror of https://github.com/xaoxuu/ProHUD
async call
This commit is contained in:
parent
b2a73f1c1b
commit
911702aa85
|
@ -55,9 +55,11 @@ class TestToast: HUDProviderType {
|
|||
// 详见子类中的 self.init(initializer: nil)
|
||||
return
|
||||
}
|
||||
let t = Target()
|
||||
initializer(t)
|
||||
t.push()
|
||||
Task {
|
||||
let t = await Target()
|
||||
initializer(t)
|
||||
await t.push()
|
||||
}
|
||||
}
|
||||
|
||||
/// 根据ViewModel和自定义的初始化代码创建一个Target并显示
|
||||
|
|
|
@ -22,9 +22,11 @@ open class AlertProvider: HUDProviderType {
|
|||
// 详见子类中的 self.init(initializer: nil)
|
||||
return
|
||||
}
|
||||
let t = Target()
|
||||
initializer(t)
|
||||
t.push()
|
||||
Task {
|
||||
let t = await Target()
|
||||
initializer(t)
|
||||
await t.push()
|
||||
}
|
||||
}
|
||||
|
||||
/// 根据ViewModel和自定义的初始化代码创建一个Target并显示
|
||||
|
|
|
@ -22,9 +22,11 @@ open class CapsuleProvider: HUDProviderType {
|
|||
// 详见子类中的 self.init(initializer: nil)
|
||||
return
|
||||
}
|
||||
let t = Target()
|
||||
initializer(t)
|
||||
t.push()
|
||||
Task {
|
||||
let t = await Target()
|
||||
initializer(t)
|
||||
await t.push()
|
||||
}
|
||||
}
|
||||
|
||||
/// 根据ViewModel和自定义的初始化代码创建一个Target并显示
|
||||
|
|
|
@ -22,9 +22,11 @@ public final class SheetProvider: HUDProviderType {
|
|||
// 详见子类中的 self.init(initializer: nil)
|
||||
return
|
||||
}
|
||||
let t = Target()
|
||||
initializer(t)
|
||||
t.push()
|
||||
Task {
|
||||
let t = await Target()
|
||||
initializer(t)
|
||||
await t.push()
|
||||
}
|
||||
}
|
||||
|
||||
/// 如果不存在就创建并弹出一个HUD实例,如果存在就更新实例
|
||||
|
|
|
@ -22,9 +22,11 @@ open class ToastProvider: HUDProviderType {
|
|||
// 详见子类中的 self.init(initializer: nil)
|
||||
return
|
||||
}
|
||||
let t = Target()
|
||||
initializer(t)
|
||||
t.push()
|
||||
Task {
|
||||
let t = await Target()
|
||||
initializer(t)
|
||||
await t.push()
|
||||
}
|
||||
}
|
||||
|
||||
/// 根据ViewModel和自定义的初始化代码创建一个Target并显示
|
||||
|
|
Loading…
Reference in New Issue