title: Why would you need a DispatchQueue when showing Alerts on Swift?
body: <p>I am new to Swift, and trying to examine a finished project. But there is something i couldn't understand.</p>
  
  <p>After a network request is completed, the app show an alert under a condition.</p>
  
  <pre><code>func makeNetworkRequest() {
     //newtork result...
     DispatchQueue.main.async {
         self.showAlert(versionMessage: "Error")
     }
  } 
  
  func showAlert(versionMessage: String) {
     let alert = UIAlertView(title: "", message: versionMessage, delegate: self)
     alert.show()
  }
  </code></pre>
  
  <p>However, it is done with a <code>DispatchQueue</code>. Why would anyone need to use <code>DispatchQueue</code> in this situation.</p>