uistatusbar

StatusBar bug in iOS7? [duplicate]

馋奶兔 提交于 2019-12-13 10:10:08
问题 This question already has answers here : Status bar and navigation bar appear over my view's bounds in iOS 7 (20 answers) Closed 6 years ago . I have been stumpted by the fact that apple is making the StatusBar Overlay the viewController...or the bounds of my application. Is there a way i can move the TitleBar down in the StoryBoard? or do i have to guess where to place it? I am confused on what to do, now that the move to iOS7 has come. Here is my TitleBar in the application and in the

UINavigationBar moving under status bar when another viewController hides status bar

我是研究僧i 提交于 2019-12-13 05:51:47
问题 The problem is simple, the Profile viewController has a NavigationBar just under the status bar. I push another viewController on top of the current one. This new viewController hides the status bar. When I go back to the Profile viewController , the navigationBar has moved up by the size of the status bar height. I tried to force a layout refresh in my viewWillAppear but it doesn't work. Any ideas? 回答1: Implement viewDidDisappear in that presented viewcontroller and show status bar again

Existing app crashes on startup on iPhone X Simulator

时光毁灭记忆、已成空白 提交于 2019-12-12 12:29:50
问题 I have an existing app, that crashes on launch, when running on iPhone X Simulator. (Breakpoint stops on the main.m files). The app runs fine on iPhone 8 simulator, so it has something to with iPhone X. Also, it has something to do with the status bar, since the stack shows something with [UIStatusbar _prepareForVisualProviderIfNeeded] before the crash. Do I need to do something with status bar to run this app on iPhone X Simulator? 回答1: Found the answer here: All exception break point is

Setting status bar hidden is messing with my navigation bar background image size

。_饼干妹妹 提交于 2019-12-12 04:48:37
问题 In my app I want to change only one view controller status bat to hidden. So in the view did load method I added this: - (BOOL)prefersStatusBarHidden { return YES; } Thats what allot of the guides online said to do. Now, this view controller is a table view, and I have set its nav bar background image to something custom, it looks like this before Im hiding the status bar: And after I added the hidden method: So you can see it cuts part of the bg image (with the green line). my nav bar bg

Custom background color for status bar in iOS app created with Xcode and Swift

给你一囗甜甜゛ 提交于 2019-12-12 03:23:53
问题 I already googled a little bit but without success. I want to have a custom background color for the status bar in all my ViewControllers (only in portrait mode). The ViewControllers are managed with a TabBarController. Does anybody know how to do that? Maybe anybody has a code sample? 回答1: I already solved the problem myself by putting a UIView below the Status bar and set the background color. But I had to clear all constraints and add them again to make the UIView hiding in landscape mode.

How to hide status bar automatically after load view

旧巷老猫 提交于 2019-12-11 19:59:59
问题 guys, I want to hide the status bar in the code. After loaded view, the status bar will show and it will automatically hide after a while. How to do that? 回答1: You want UIApplication 's setStatusBarHidden:withAnimation: [[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationSlide]; See the docs. 回答2: Haven't tested it and there might be a better way but if you put the following in your load view function: [self performSelector:@selector(hideNavBar)

Bug when swiping from view with uinavigationbar to one without

淺唱寂寞╮ 提交于 2019-12-11 12:21:19
问题 I have an application with 2 viewcontrollers, ViewController and NextViewController. ViewController does not have a navigation bar and has a white status bar. NextViewController does have a navigation bar and has a black (default) status bar. I have encountered a bug when swiping back to ViewController from NextViewController and cancelling the swipe where the navigation bar on NextViewController will disappear. The storyboard simply has the two views with a button and an action segue. The

Status bar background color

只愿长相守 提交于 2019-12-11 11:53:27
问题 I am trying to make my status bar background color the same as my navigation bar, I was trying to find the answer in google but it does not work clearly for me... Can you please explain how it works and how can I fix it? 回答1: It looks to me like you have a UINavigationBar up there, which is what's causing the gap at the top. If you are able to, embed your view controller in a UINavigationController instead, then set your navigation item buttons in code. This gives you the same effect, but

Location Services and Call Description status bar of iOS causes to appear black status bar. How to fix it?

拜拜、爱过 提交于 2019-12-11 08:02:19
问题 When Other Applications uses Location services iOS status bar example given below. It Causes a black status bar above and it causes some problem on network operations such as sending data to the server / Job request are not working when the black status bar appear only. See Below Screenshot. Sometimes it causes on below screen as well. When Black bar appears on the screen it's not going away till closes the app and re open it. It causing major functionalities of this app. 回答1: Select

Navbar not animating while hiding but still animates while reappearing

此生再无相见时 提交于 2019-12-11 07:02:50
问题 I followed this answer and added a UIGestureRecognizer to show or hide the Navbar and Toolbar. Strangely, the Navbar is not silding while hiding but it still slides when it reappears. the toolbar is animating all the time. I changed the code to: override var preferredStatusBarUpdateAnimation: UIStatusBarAnimation { print("got called") return UIStatusBarAnimation.slide } to see if it's being called when it hides and it is getting called. I also tried setting