title: Get the center of screen with Navigation Bar considerations
body: <p>I am trying to center a UIActivityIndicator and reuse it throughout my app.  I'm facing an issue where some of my views have to be under the navigation bar, and some aren't. This happens to give my activity indicator a lower than center presentation on views where the view is not under the navigation bar.  For instance:</p>
  
  <p><a href="https://i.stack.imgur.com/t9e8G.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/t9e8G.jpg" alt="enter image description here"></a></p>
  
  <p>All the answers on StackOverflow seem to fall under picture #2.</p>
  
  <p>I've simply made an extension of UIView to show and hide the activity indicator by adding it as a subview overlay.  Checking multiple posts on StackOverflow, I didn't find anything that would duplicate this question.  </p>
  
  <p>My question is, in a production app, how would one successfully center this view for both of these situations utilizing only one function but still support IOS version back to 9.3</p>