From eb9e7cd0712dc5f3c01f3e500c66c9beadbdbd41 Mon Sep 17 00:00:00 2001 From: Felix Mau Date: Sat, 31 Aug 2019 10:15:17 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20::=20Updated=20documentation=20/?= =?UTF-8?q?=20fix=20typos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Tests/ViewModel/GradientLoadingBarViewModelTestCase.swift | 1 + GradientLoadingBar/Classes/GradientLoadingBarController.swift | 2 +- GradientLoadingBar/Classes/Misc/Constants.swift | 2 +- .../Classes/ViewModel/GradientLoadingBarViewModel.swift | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Example/Tests/ViewModel/GradientLoadingBarViewModelTestCase.swift b/Example/Tests/ViewModel/GradientLoadingBarViewModelTestCase.swift index b1188e0..c661858 100644 --- a/Example/Tests/ViewModel/GradientLoadingBarViewModelTestCase.swift +++ b/Example/Tests/ViewModel/GradientLoadingBarViewModelTestCase.swift @@ -78,6 +78,7 @@ class GradientLoadingBarViewModelTestCase: XCTestCase { var disposeBag = DisposeBag() + // As we've just initialized the view model it has to exist at this point, and therefore we can "safely" use force-unwrapping here. // swiftlint:disable:next force_unwrapping viewModel!.superview.subscribe { newSuperview, _ in guard newSuperview == nil else { diff --git a/GradientLoadingBar/Classes/GradientLoadingBarController.swift b/GradientLoadingBar/Classes/GradientLoadingBarController.swift index 8348969..d0d7b92 100644 --- a/GradientLoadingBar/Classes/GradientLoadingBarController.swift +++ b/GradientLoadingBar/Classes/GradientLoadingBarController.swift @@ -72,7 +72,7 @@ open class GradientLoadingBarController { self.height = height self.isRelativeToSafeArea = isRelativeToSafeArea - // We don't want the view to be visibly initially. + // We don't want the view to be visible initially. gradientView.fadeOut(duration: 0) bindViewModelToView() diff --git a/GradientLoadingBar/Classes/Misc/Constants.swift b/GradientLoadingBar/Classes/Misc/Constants.swift index 5460e97..d9d34b6 100644 --- a/GradientLoadingBar/Classes/Misc/Constants.swift +++ b/GradientLoadingBar/Classes/Misc/Constants.swift @@ -21,7 +21,7 @@ extension UIColor { } extension TimeInterval { - /// Nummeric default values. + /// Numeric default values. public struct GradientLoadingBar { /// The default duration for fading-in the loading bar, measured in seconds. public static let fadeInDuration = 0.33 diff --git a/GradientLoadingBar/Classes/ViewModel/GradientLoadingBarViewModel.swift b/GradientLoadingBar/Classes/ViewModel/GradientLoadingBarViewModel.swift index 3f7ac8a..98ea978 100644 --- a/GradientLoadingBar/Classes/ViewModel/GradientLoadingBarViewModel.swift +++ b/GradientLoadingBar/Classes/ViewModel/GradientLoadingBarViewModel.swift @@ -50,7 +50,7 @@ final class GradientLoadingBarViewModel { } deinit { - /// By providing a custom deinitializer we make sure to remove the corresponding `gradientView` from its superview. + /// By providing a custom deinitializer we make sure to remove the gradient-view from its superview. superviewSubject.value = nil }