From d378e002a0b2102f5528b04fcd4e38fdb9fc503c Mon Sep 17 00:00:00 2001 From: Felix Mau Date: Wed, 19 Sep 2018 21:45:35 +0200 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20::=20Update=20to=20Swift?= =?UTF-8?q?=204.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Example/GradientLoadingBar/AppDelegate.swift | 2 +- .../Tests/ViewModel/GradientLoadingBarViewModelTestCase.swift | 4 ++-- .../Classes/ViewModel/GradientLoadingBarViewModel.swift | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) 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) } }