title: How to check if a view is displayed on the screen? (Swift 5 and SwiftUI)
body: <p>I have a view like below. I want to find out if it is the view which is displayed on the screen. Is there a function to achieve this?</p>
  
  <pre><code>struct TestView: View {
      var body: some View {
          Text("Test View")
      }
  }
  </code></pre>