diff --git a/Example/GradientLoadingBar/AppDelegate.swift b/Example/GradientLoadingBar/AppDelegate.swift index 1444a2e..b83a7b2 100644 --- a/Example/GradientLoadingBar/AppDelegate.swift +++ b/Example/GradientLoadingBar/AppDelegate.swift @@ -13,7 +13,7 @@ import UIKit class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + private func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. // Customize shared instance of `GradientLoadingBar` diff --git a/Example/Tests/ViewModel/GradientLoadingBarViewModelTestCase.swift b/Example/Tests/ViewModel/GradientLoadingBarViewModelTestCase.swift index 481ec12..ce2e39a 100644 --- a/Example/Tests/ViewModel/GradientLoadingBarViewModelTestCase.swift +++ b/Example/Tests/ViewModel/GradientLoadingBarViewModelTestCase.swift @@ -83,7 +83,7 @@ class GradientLoadingBarViewModelTestCase: XCTestCase { }.add(to: &disposal) // When - notificationCenter.post(name: .UIWindowDidBecomeKey, + notificationCenter.post(name: UIWindow.didBecomeKeyNotification, object: nil) } @@ -111,7 +111,7 @@ class GradientLoadingBarViewModelTestCase: XCTestCase { // When for _ in 1 ... 3 { - notificationCenter.post(name: .UIWindowDidBecomeKey, + notificationCenter.post(name: UIWindow.didBecomeKeyNotification, object: nil) } diff --git a/GradientLoadingBar/Classes/ViewModel/GradientLoadingBarViewModel.swift b/GradientLoadingBar/Classes/ViewModel/GradientLoadingBarViewModel.swift index ca2e474..1cc882d 100644 --- a/GradientLoadingBar/Classes/ViewModel/GradientLoadingBarViewModel.swift +++ b/GradientLoadingBar/Classes/ViewModel/GradientLoadingBarViewModel.swift @@ -61,7 +61,7 @@ class GradientLoadingBarViewModel { // Therefore we setup an observer to inform the listeners when it's ready. notificationCenter.addObserver(self, selector: #selector(didReceiveUiWindowDidBecomeKeyNotification(_:)), - name: .UIWindowDidBecomeKey, + name: UIWindow.didBecomeKeyNotification, object: nil) } }