2

My device is iPhone 5s running version 8.1.3. When any location based application runs in the background, the status bar becomes blue and big, thereby pushing my app's views down.

Is there any way that I could identify if any app run in the background and resize my view? Usually how is this handled?

Attached images.

enter image description here enter image description here

iOS
  • 3,526
  • 3
  • 37
  • 82
  • 1
    Do you really want to identify whether or not other apps are running in the background (what if one _is_ running in the background, but _not_ using location services?), or is what you're really after a way to get the current status-bar height (and/or notifications when it changes)? If it's the second option, see [this answer](http://stackoverflow.com/questions/2944411/how-to-get-notified-when-the-status-bar-height-changes). – aroth Apr 21 '15 at 05:16
  • Just wanna listen to status bar height change. – iOS Apr 21 '15 at 05:18

1 Answers1

2

Yes. Your app delegate can implement these methods:

-application:willChangeStatusBarFrame:
-application:didChangeStatusBarFrame:

and these local notifications will also be sent to the default notification center:

UIApplicationWillChangeStatusBarFrameNotification
UIApplicationDidChangeStatusBarFrameNotification
Tanuj
  • 531
  • 4
  • 10