Put a slight delay in hiding the progress bar
This commit is contained in:
parent
612d7d0755
commit
11140f2289
|
@ -106,8 +106,10 @@ public extension UINavigationController {
|
||||||
func finishProgress() {
|
func finishProgress() {
|
||||||
progressView.bar.alpha = 1
|
progressView.bar.alpha = 1
|
||||||
progressView.setProgress(1, animated: true) {
|
progressView.setProgress(1, animated: true) {
|
||||||
UIView.animate(withDuration: 0.5, animations: { self.progressView.bar.alpha = 0 }) { finished in
|
DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) {
|
||||||
self.progressView.progress = 0
|
UIView.animate(withDuration: 0.5, animations: { self.progressView.bar.alpha = 0 }) { finished in
|
||||||
|
self.progressView.progress = 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -117,9 +119,11 @@ public extension UINavigationController {
|
||||||
*/
|
*/
|
||||||
func cancelProgress() {
|
func cancelProgress() {
|
||||||
progressView.setProgress(0, animated: true) {
|
progressView.setProgress(0, animated: true) {
|
||||||
UIView.animate(withDuration: 0.5, animations: {
|
DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) {
|
||||||
self.progressView.bar.alpha = 0
|
UIView.animate(withDuration: 0.5, animations: {
|
||||||
})
|
self.progressView.bar.alpha = 0
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue