0

I am new to App development I am trying to make an app which needs to access and change top bar/status bar on both iOS and Android. I have Searched many Sites even StackOverflow but all I get was It shows how to change colour of text in these bars, there are tremendous Coders are out there working fantastic on both platform, please can any one give me is it could be done? if yes then what is the approach. For more clarification I am uploading Images for top bars.

Android

enter image description here

And Iphone enter image description here

This is what I want to do. Change items or add items in the statusbar

enter image description here

Any Help will be highly appreciated.

Ahsan
  • 173
  • 1
  • 13
  • Possible duplicate of [How to change the status bar background color and text color on iOS 7?](https://stackoverflow.com/questions/19063365/how-to-change-the-status-bar-background-color-and-text-color-on-ios-7) – Vandit Mehta Apr 12 '18 at 11:50
  • if you have clearly read the question I have mentioned I don't need only color changing. I need full access. – Ahsan Apr 12 '18 at 15:34

1 Answers1

0

In iOS:

  • Change in info.plist the row View controller-based status bar appearance and set it to NO
  • Change in appDelegate.swift in didFinishLaunchingWithOptions

    UIApplication.shared.statusBarStyle = .lightContent

SwiftNinja95
  • 157
  • 2
  • 16
  • thanks for considering but I want to completely access to add up some things like strings etc. is that would be possible. ? – Ahsan Apr 12 '18 at 15:48
  • @Ahsan can u explain what u are trying to achieve? with an e.g. with respect to screenshot above. – SwiftNinja95 Apr 13 '18 at 05:27
  • Added now please check. – Ahsan Apr 13 '18 at 05:41
  • I don't think you can do that in iOS . Apple has specifically written in their human interface guidelines "Use the system-provided status bar. People expect the status bar to be consistent systemwide. Don’t replace it with a custom status bar." for reference :https://developer.apple.com/ios/human-interface-guidelines/bars/status-bars/ – SwiftNinja95 Apr 13 '18 at 06:37
  • I think you can either completely hide your status bar or u can add a UIView on top of the staus bar of size (320 x 20) but whether it will be accepted in App Store or not.... I have no guarantee – SwiftNinja95 Apr 13 '18 at 06:42
  • okay Thankyou, but I need that UIView to pe placed on there if the app is in background state . would that be possible . – Ahsan Apr 13 '18 at 07:05
  • nope... it can only work on particular functionalities such as gps, voice and all – SwiftNinja95 Apr 13 '18 at 09:45