代码优化

This commit is contained in:
xaoxuu 2020-06-19 10:54:55 +08:00
parent 639dab2db0
commit 6b5b3dc0c9
4 changed files with 10 additions and 10 deletions

View File

@ -133,7 +133,7 @@ public extension Guard {
return f(vc)
}
}
debug("请传入需要push到的控制器")
debug("⚠️自动获取根控制器失败,设置根控制器或者传入需要push到的控制器")
}
return self
}

View File

@ -9,20 +9,20 @@
import UIKit
@available(iOS 13.0, *)
public var sharedWindowScene: UIWindowScene?
fileprivate var sharedWindowScene: UIWindowScene?
public extension ProHUD {
struct Configuration {
/// Debug
public var enableDebugPrint = true
/// log
public var enablePrint = true
///
///
public var rootViewController: UIViewController?
@available(iOS 13.0, *)
/// Xcode11 windowScene
/// iOS13
public var windowScene: UIWindowScene? {
set {
sharedWindowScene = newValue

View File

@ -113,8 +113,8 @@ internal var isPortrait: Bool {
/// Debug
internal func debug(_ items: Any..., separator: String = " ", terminator: String = "\n") {
if cfg.enableDebugPrint {
debugPrint(items, separator: separator, terminator: terminator)
if cfg.enablePrint {
print(items, separator: separator, terminator: terminator)
}
}

View File

@ -257,7 +257,7 @@ public extension Toast {
} else if toasts.count == 1 {
toasts.removeAll()
} else {
debug("漏洞已经没有toast了")
debug("‼️代码漏洞已经没有toast了")
}
UIView.animateForToast(animations: {
toast.window?.transform = .init(translationX: 0, y: -20-toast.maxY)