 <p><strong>Swift</strong></p> <pre><code>UIApplication.sharedApplication().networkActivityIndicatorVisible = true </code></pre> <p><strong>Swift 3, XCode 8</strong> (Thanks @sasho)</p> <p><code>UIApplication.shared.isNetworkActivityIndicatorVisible = true</code></p>