title: How do i get current active view controller?
body: <p>I'm having this issue (error is reported by Flurry analytics from some users, but I cannot reproduce it neither on my device nor simulator):</p>
  
  <p><code>NSInvalidArgumentException: Application tried to present modally an active controller &lt;CityViewController: 0x361b20&gt;.</code></p>
  
  <p>Do you know anything about this error? Has it happened to you?</p>
  
  <p>Application has three hierachically sorted views: master view controller with list of locations and detail view (the CityViewController mentioned in error message) is automatically presented when user is at one of known locations. Whenever location significantly changes, detail view is dismissed first before opening new location to prevent this. However, it apparently doesn't help.</p>
  
  <p>CityViewController can also open SMS composer as its child.</p>