0
votes

I need to hide/show status bar in Unity game for iOS, specially in case of Facebook. As per their new rule whenever app is opened from facebook we need to show status bar and give option of "back to facebook" as done in all other apps.

[UIApplication sharedApplication] setStatusBarHidden:YES]; is deprecated in iOS 9.

** -(BOOL)prefersStatusBarHidden {return isHidden;}** Above code needs to be added in ViewController but I cannot add this in unity's by default viewcontroller. Is there any way I can show/hide status bar

1

1 Answers

1
votes

The bool function PlayerSettings.statusBarHidden can be used to set it to true or false. Since what you have mentioned is deprecated, a plugin is used in Unity for iOS. VC is overridden and it is supported for all iOS devices. The plugin can be found here: https://github.com/HuaYe1975/UnityStatusBarForiOS

Supports different styles as well.