mirror of
https://github.com/fxm90/GradientLoadingBar.git
synced 2026-06-16 12:24:31 +00:00
♻️ :: Update to Swift 4.2
This commit is contained in:
@@ -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`
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user