Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Title Bar and Objc_util
-
@stephen we are in the right way,I hope but not sure
from objc_util import * a = ObjCClass('UIApplication').sharedApplication() for window in a.windows(): print(window.windowScene().statusBarManager().isStatusBarHidden())
Edit: if, in the loop, you add print(window), you will see that the first window is a PA3PythonistaWindow object
-
From a bit of searching it seems like
prefersStatusBarHidden
(source) returns true/false if the view controller is requesting the status bar to be hidden. Not sure if this would work, just thought I would through in what I found. -
-
@stephen try
from objc_util import * a = ObjCClass('UIApplication').sharedApplication() for window in a.windows(): if 'PA3PythonistaWindow' in str(window._get_objc_classname()): #print(dir(window.windowScene().statusBarManager())) print(window.windowScene().statusBarManager().statusBarHeight()) print(window.windowScene().statusBarManager().statusBarHidden()) break
-
-
-
@stephen the checks are about statusBar, not titleBar, no?
-
@cvp no im sorry 😎 i need to check if a mainView has
hide_title_bar
from present() set to true or False after runtime from inside the customeView Class body -
@Samer said:
From a bit of searching it seems like
prefersStatusBarHidden
(source) returns true/false if the view controller is requesting the status bar to be hidden. Not sure if this would work, just thought I would through in what I found.gave
prefersStatusBarHidden
a try and doesnt seem to exist within pythonistas UIView environment -
@stephen said:
i need to check if a mainView has hide_title_bar from present()
I guess your problem is for a sheet only, because if full screen,
the height of the ui.View is
either the screen height (hide_title_bar=True)
either 70 pixels less (hide_title_bar=False). -
@cvp Fullscreen objc scrollview
Normaly Yes but this is tied into this lol and that titlebar is givin me a run for my lunch.. we have done the following so far..- walked SuperViewTree
- Iterated over objc UIApplicstion
- Checked layout for all inset values.
every time i feel close... nothin lol i even think i found a nav view with y set to 70.. but nothingbwith height 70..