Turns out a view in the view hierarchy was not resized appropriately.
Black strip on top despite statusBarHidden
-
28-06-2022 - |
Вопрос
There is a black strip, of the same frame as the status bar
on the top of the screen despite setting the status bar hidden
, using :
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationSlide];
The StatusBar
hides without any hiccups. But the black strip is persistent. It is causing my view
to be resized, which is supposed to be fullscreen.
I have tried setting wantsFullScreenLayout
to YES, in vain.
Is there a way to hide it, or set it's alpha
?
I do NOT use any XIB
s. I do everything programmatically only, so I cannot change any properties in the XIB
.
To go in a bit of detail, I have a UINavigationController
with a rootViewcontroller. The user taps an image, and I push MWPhotoBrowser
on it, which can further push other viewControllers
like this:
rootViewController -> photoBrowser -> otherViewControllers -> ...
-> = PUSH
operation
If any other details are needed, please tell me.
Thank you.
Решение 2
Другие советы
No. No need to set any alpha value.
Just go through your xib.
- Select the view of your view controller
- Go to Attribute Inspector
- Check the value for status bar, navigation controller & bottom bar over there
- Set status bar to None if not.
- Change topbar & bottombar as per your requirements
- Adjust your gui accordingly.
In the storyboard or xib file set Status bar at "none" in Attributes inspector > simulated section