mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Adjusted the progress bar so that it will make it to 100%
This commit is contained in:
@@ -45,7 +45,6 @@ public final class NavigationProgressView: UIView {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* ====================================================================== */
|
||||
// MARK: - initializer
|
||||
/* ====================================================================== */
|
||||
@@ -119,14 +118,15 @@ public final class NavigationProgressView: UIView {
|
||||
// MARK: - Method
|
||||
/* ====================================================================== */
|
||||
|
||||
internal func setProgress(_ progress: Float, animated: Bool) {
|
||||
let duration: TimeInterval = animated ? 0.1 : 0
|
||||
internal func setProgress(_ progress: Float, animated: Bool, completion: @escaping () -> Void) {
|
||||
let duration: TimeInterval = animated ? 0.2 : 0
|
||||
|
||||
self.progress = progress
|
||||
|
||||
UIView.animate(withDuration: duration, animations: {
|
||||
self.layoutIfNeeded()
|
||||
})
|
||||
UIView.animate(withDuration: duration, animations: { self.layoutIfNeeded() }) { _ in
|
||||
completion()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user