iOS Code Snippet Full screen apps

You can hide the status bar by following these steps:

1. Add this attribute:
B4X:
#PlistExtra: <key>UIViewControllerBasedStatusBarAppearance</key><false/>

2. Add this code:
B4X:
Dim no As NativeObject = app
no.RunMethod("setStatusBarHidden:animated:", Array(True, False))
 

JackKirk

Well-Known Member
Licensed User
Longtime User
Is there a way to determine status bar state?

I would like to:

(1) Determine status bar state.
(2) If visible - hide it via post #1.
(3) Do stuff.
(4) If was originally visible - reshow it.

Thanks...
 

JackKirk

Well-Known Member
Licensed User
Longtime User
After you hide the status bar as per post #1, how do you show it again?
B4X:
Dim no As NativeObject = app
no.RunMethod("setStatusBarHidden:animated:", Array(False, False))
doesn't seem to work - or it may be putting up a blank status bar.

I've googled without success.

BTW it appears that setStatusBarHidden:animated is well and truly deprecated so is a more up to date means possible?

Thanks in advance...
 
Last edited:
Top