marinofaggiana 5 年之前
父节点
当前提交
6ae9739f52
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      iOSClient/Main/NCDetailNavigationController.swift

+ 4 - 0
iOSClient/Main/NCDetailNavigationController.swift

@@ -102,6 +102,10 @@ class NCDetailNavigationController: UINavigationController {
     //MARK: - ProgressBar
     //MARK: - ProgressBar
 
 
     @objc func setProgressBar() {
     @objc func setProgressBar() {
+        if progressView != nil {
+            progressView?.removeFromSuperview()
+        }
+        
         progressView = UIProgressView.init(progressViewStyle: .bar)
         progressView = UIProgressView.init(progressViewStyle: .bar)
         progressView!.frame = CGRect(x: 0, y: navigationBar.frame.height-progressHeight, width: navigationBar.frame.width, height: progressHeight)
         progressView!.frame = CGRect(x: 0, y: navigationBar.frame.height-progressHeight, width: navigationBar.frame.width, height: progressHeight)
         progressView!.setProgress(0, animated: false)
         progressView!.setProgress(0, animated: false)