diff --git a/Source/Guard/GuardController.swift b/Source/Guard/GuardController.swift index c1b2547..ff0bff5 100644 --- a/Source/Guard/GuardController.swift +++ b/Source/Guard/GuardController.swift @@ -133,7 +133,7 @@ public extension Guard { return f(vc) } } - debug("请传入需要push到的控制器") + debug("⚠️自动获取根控制器失败,请设置根控制器或者传入需要push到的控制器") } return self } diff --git a/Source/HUDConfig.swift b/Source/HUDConfig.swift index 115d512..7554b74 100644 --- a/Source/HUDConfig.swift +++ b/Source/HUDConfig.swift @@ -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 diff --git a/Source/ProHUD.swift b/Source/ProHUD.swift index 9df296d..829d105 100644 --- a/Source/ProHUD.swift +++ b/Source/ProHUD.swift @@ -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) } } diff --git a/Source/Toast/ToastController.swift b/Source/Toast/ToastController.swift index 9e0c371..fcf7e52 100644 --- a/Source/Toast/ToastController.swift +++ b/Source/Toast/ToastController.swift @@ -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)