2

If I read [[UIApplication sharedApplication] statusBarFrame].size.height, then I get height of the frame of the status bar with in-call addition (press Command+Y in the Simulator to see it).

But how can I get the original status bar height without in-call addition?

Dmitry
  • 14,306
  • 23
  • 105
  • 189
  • How can I get original status bar height without in-call addition - is not clear , plz elobrate – Anbu.Karthik Feb 12 '18 at 09:00
  • For example, on iPhone 8 status bar height is 20. But if you receive call, then it becomes 40. – Dmitry Feb 12 '18 at 09:08
  • ya correct , but what concept you tried and what the OP you expect – Anbu.Karthik Feb 12 '18 at 09:10
  • I just want to get 20 - not 40. – Dmitry Feb 12 '18 at 09:12
  • see this it will help you https://stackoverflow.com/questions/1114557/resize-for-in-call-status-bar – Anbu.Karthik Feb 12 '18 at 09:12
  • There is no answer there. If user launches the application with in-call status bar, then you can't track its original size! – Dmitry Feb 12 '18 at 09:13
  • are you tried `name:UIApplicationWillChangeStatusBarFrameNotification` it will throw the notification changes – Anbu.Karthik Feb 12 '18 at 09:15
  • I can track any changes if user launched the application with normal status bar and then changed it to in-call status bar. But if the application was launched with in-call status bar initially, then I don't receive any notifications about changing of status bar frame. And it's actually not changing in this case. – Dmitry Feb 12 '18 at 09:19
  • got it your point – Anbu.Karthik Feb 12 '18 at 09:20

0 Answers0