mirror of
https://github.com/fxm90/GradientLoadingBar.git
synced 2026-06-16 12:24:31 +00:00
📝 :: Updated documentation / fix typos
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user