mirror of https://github.com/xaoxuu/ProHUD
example
This commit is contained in:
parent
84b9931a8a
commit
b6f4fdd781
|
@ -74,50 +74,3 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extension ProHUD.Scene {
|
|
||||||
|
|
||||||
static var delete: ProHUD.Scene {
|
|
||||||
var scene = ProHUD.Scene(identifier: "prohud.delete")
|
|
||||||
scene.image = UIImage(named: "prohud.trash")
|
|
||||||
scene.title = "确认删除"
|
|
||||||
scene.message = "此操作不可撤销"
|
|
||||||
return scene
|
|
||||||
}
|
|
||||||
|
|
||||||
static var buy: ProHUD.Scene {
|
|
||||||
var scene = ProHUD.Scene(identifier: "buy")
|
|
||||||
scene.image = UIImage(named: "alert.buy")
|
|
||||||
scene.title = "确认付款"
|
|
||||||
scene.message = "一旦购买拒不退款"
|
|
||||||
return scene
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 重写的loading场景
|
|
||||||
static var loading: ProHUD.Scene {
|
|
||||||
var scene = ProHUD.Scene.init(identifier: "prohud.loading.rotate")
|
|
||||||
scene.image = UIImage(named: "prohud.rainbow.circle")
|
|
||||||
scene.title = "坐和放宽"
|
|
||||||
scene.message = "正在处理一些事情"
|
|
||||||
scene.alertDuration = 0
|
|
||||||
scene.toastDuration = 0
|
|
||||||
return scene
|
|
||||||
}
|
|
||||||
|
|
||||||
static var sync: ProHUD.Scene {
|
|
||||||
var scene = ProHUD.Scene.init(identifier: "sync.rotate")
|
|
||||||
scene.image = UIImage(named: "prohud.rainbow.circle")
|
|
||||||
scene.title = "正在同步"
|
|
||||||
scene.alertDuration = 0
|
|
||||||
scene.toastDuration = 0
|
|
||||||
return scene
|
|
||||||
}
|
|
||||||
static var sync2: ProHUD.Scene {
|
|
||||||
var scene = ProHUD.Scene.init(identifier: "sync.rotate")
|
|
||||||
scene.image = UIImage(named: "prohud.rainbow.circle")
|
|
||||||
scene.alertDuration = 0
|
|
||||||
scene.toastDuration = 0
|
|
||||||
return scene
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
|
import ProHUD
|
||||||
|
|
||||||
class RootVC: UIViewController {
|
class RootVC: UIViewController {
|
||||||
|
|
||||||
|
@ -38,3 +39,50 @@ class RootVC: UIViewController {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extension ProHUD.Scene {
|
||||||
|
|
||||||
|
static var delete: ProHUD.Scene {
|
||||||
|
var scene = ProHUD.Scene(identifier: "prohud.delete")
|
||||||
|
scene.image = UIImage(named: "prohud.trash")
|
||||||
|
scene.title = "确认删除"
|
||||||
|
scene.message = "此操作不可撤销"
|
||||||
|
return scene
|
||||||
|
}
|
||||||
|
|
||||||
|
static var buy: ProHUD.Scene {
|
||||||
|
var scene = ProHUD.Scene(identifier: "buy")
|
||||||
|
scene.image = UIImage(named: "alert.buy")
|
||||||
|
scene.title = "确认付款"
|
||||||
|
scene.message = "一旦购买拒不退款"
|
||||||
|
return scene
|
||||||
|
}
|
||||||
|
|
||||||
|
/// 重写的loading场景
|
||||||
|
static var loading: ProHUD.Scene {
|
||||||
|
var scene = ProHUD.Scene.init(identifier: "prohud.loading.rotate")
|
||||||
|
scene.image = UIImage(named: "prohud.rainbow.circle")
|
||||||
|
scene.title = "坐和放宽"
|
||||||
|
scene.message = "正在处理一些事情"
|
||||||
|
scene.alertDuration = 0
|
||||||
|
scene.toastDuration = 0
|
||||||
|
return scene
|
||||||
|
}
|
||||||
|
|
||||||
|
static var sync: ProHUD.Scene {
|
||||||
|
var scene = ProHUD.Scene.init(identifier: "sync.rotate")
|
||||||
|
scene.image = UIImage(named: "prohud.rainbow.circle")
|
||||||
|
scene.title = "正在同步"
|
||||||
|
scene.alertDuration = 0
|
||||||
|
scene.toastDuration = 0
|
||||||
|
return scene
|
||||||
|
}
|
||||||
|
static var sync2: ProHUD.Scene {
|
||||||
|
var scene = ProHUD.Scene.init(identifier: "sync.rotate")
|
||||||
|
scene.image = UIImage(named: "prohud.rainbow.circle")
|
||||||
|
scene.alertDuration = 0
|
||||||
|
scene.toastDuration = 0
|
||||||
|
return scene
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -50,6 +50,8 @@ class ViewController: BaseListVC {
|
||||||
}
|
}
|
||||||
sec.addRow(title: "持续时间", subtitle: "设置 duration 来指定持续时间,设置为 0 可以永久持续。\n原生提供的 loading 场景持续时间为永久。\n如果弹窗添加了按钮,则持续时间会自动变成永久,除非手动设置。") {
|
sec.addRow(title: "持续时间", subtitle: "设置 duration 来指定持续时间,设置为 0 可以永久持续。\n原生提供的 loading 场景持续时间为永久。\n如果弹窗添加了按钮,则持续时间会自动变成永久,除非手动设置。") {
|
||||||
}
|
}
|
||||||
|
sec.addRow(title: "支持深色模式", subtitle: "切换一下模式看看") {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"repositoryURL": "https://github.com/xaoxuu/Inspire",
|
"repositoryURL": "https://github.com/xaoxuu/Inspire",
|
||||||
"state": {
|
"state": {
|
||||||
"branch": "master",
|
"branch": "master",
|
||||||
"revision": "43b6a9b7ebcd9f628590eac56cd88a85380dee21",
|
"revision": "22c89fa2ff06bcd44b8c0500a82e64d4baf80387",
|
||||||
"version": null
|
"version": null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
"repositoryURL": "https://github.com/xaoxuu/ProHUD",
|
"repositoryURL": "https://github.com/xaoxuu/ProHUD",
|
||||||
"state": {
|
"state": {
|
||||||
"branch": "master",
|
"branch": "master",
|
||||||
"revision": "232a04f293ae6aed707e95b029830f41f0402c83",
|
"revision": "84b9931a8aa979d82c53376d9ff84f9e432dcc7c",
|
||||||
"version": null
|
"version": null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -83,25 +83,3 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extension ProHUD.Scene {
|
|
||||||
static var confirm: ProHUD.Scene {
|
|
||||||
var scene = ProHUD.Scene(identifier: "confirm")
|
|
||||||
scene.image = UIImage(named: "ProHUDMessage")
|
|
||||||
return scene
|
|
||||||
}
|
|
||||||
static var delete: ProHUD.Scene {
|
|
||||||
var scene = ProHUD.Scene(identifier: "delete")
|
|
||||||
scene.image = UIImage(named: "ProHUDTrash")
|
|
||||||
scene.title = "确认删除"
|
|
||||||
scene.message = "此操作不可撤销"
|
|
||||||
return scene
|
|
||||||
}
|
|
||||||
static var buy: ProHUD.Scene {
|
|
||||||
var scene = ProHUD.Scene(identifier: "buy")
|
|
||||||
scene.image = UIImage(named: "ProHUDBuy")
|
|
||||||
scene.title = "确认付款"
|
|
||||||
scene.message = "一旦购买拒不退款"
|
|
||||||
return scene
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue