From b6f4fdd781e2fc8d874b10ee413234c46a45c0d4 Mon Sep 17 00:00:00 2001 From: xaoxuu Date: Wed, 24 Jun 2020 13:33:23 +0800 Subject: [PATCH] example --- Example-Old/Example/AppDelegate.swift | 47 ------------------ Example-Old/Example/RootVC.swift | 48 +++++++++++++++++++ Example-Old/Example/ViewController.swift | 2 + .../xcshareddata/swiftpm/Package.resolved | 4 +- .../Example-Xcode11/SceneDelegate.swift | 22 --------- 5 files changed, 52 insertions(+), 71 deletions(-) diff --git a/Example-Old/Example/AppDelegate.swift b/Example-Old/Example/AppDelegate.swift index ad31f30..4d16d0b 100644 --- a/Example-Old/Example/AppDelegate.swift +++ b/Example-Old/Example/AppDelegate.swift @@ -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 - } - -} diff --git a/Example-Old/Example/RootVC.swift b/Example-Old/Example/RootVC.swift index a775da1..580cae3 100644 --- a/Example-Old/Example/RootVC.swift +++ b/Example-Old/Example/RootVC.swift @@ -7,6 +7,7 @@ // import UIKit +import ProHUD 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 + } + +} diff --git a/Example-Old/Example/ViewController.swift b/Example-Old/Example/ViewController.swift index 580b30c..49e873d 100644 --- a/Example-Old/Example/ViewController.swift +++ b/Example-Old/Example/ViewController.swift @@ -50,6 +50,8 @@ class ViewController: BaseListVC { } sec.addRow(title: "持续时间", subtitle: "设置 duration 来指定持续时间,设置为 0 可以永久持续。\n原生提供的 loading 场景持续时间为永久。\n如果弹窗添加了按钮,则持续时间会自动变成永久,除非手动设置。") { } + sec.addRow(title: "支持深色模式", subtitle: "切换一下模式看看") { + } } } diff --git a/Example-Xcode11/Example-Xcode11.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Example-Xcode11/Example-Xcode11.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index ca24fc8..87f5c11 100644 --- a/Example-Xcode11/Example-Xcode11.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Example-Xcode11/Example-Xcode11.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -6,7 +6,7 @@ "repositoryURL": "https://github.com/xaoxuu/Inspire", "state": { "branch": "master", - "revision": "43b6a9b7ebcd9f628590eac56cd88a85380dee21", + "revision": "22c89fa2ff06bcd44b8c0500a82e64d4baf80387", "version": null } }, @@ -15,7 +15,7 @@ "repositoryURL": "https://github.com/xaoxuu/ProHUD", "state": { "branch": "master", - "revision": "232a04f293ae6aed707e95b029830f41f0402c83", + "revision": "84b9931a8aa979d82c53376d9ff84f9e432dcc7c", "version": null } }, diff --git a/Example-Xcode11/Example-Xcode11/SceneDelegate.swift b/Example-Xcode11/Example-Xcode11/SceneDelegate.swift index e4f2f28..20e1001 100644 --- a/Example-Xcode11/Example-Xcode11/SceneDelegate.swift +++ b/Example-Xcode11/Example-Xcode11/SceneDelegate.swift @@ -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 - } -}