title: Swiftui Progress View Hidden
body: <p>Hello I want to make undetermined Progress View on bar button item. when its done I want to make it hidden, but the hidden() method doesn't have parameter like disabled(Bool). how can I hide the progress view when the task getting done?</p>
  <p>This is what I want
  <a href="https://i.stack.imgur.com/0DuGY.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/0DuGY.jpg" alt="enter image description here" /></a></p>
  <p>I don't know how to hide it programmatically on swiftui because it has no parameter.</p>
  <p>this is the code</p>
  <pre><code>.navigationBarItems(leading:
     Button(action: {
        self.presentationMode.wrappedValue.dismiss()
     }, label: {
          Text(&quot;Cancel&quot;)
              .foregroundColor(.orange)
      })
   , trailing:
      //this should be hidden when the work done not always
      ProgressView()
          .hidden()
    )
  </code></pre>