uistatusbar

When hiding the statusbar my navigation bar moves up in iOS7

给你一囗甜甜゛ 提交于 2019-12-09 04:07:04
问题 I am trying to hide the statusbar but maintain the "bigger" navigationbar height. Right now when I hide the statusbar by setting - (BOOL)prefersStatusBarHidden to YES and then calling [self setNeedsStatusBarAppearanceUpdate]; . The problem with this is that the navigationbar will slide up and won't leave space for the notification I'm trying to show. Simply adding a view over the statusbar is not an option, our statusbar/navigation has the fancy blur effect. Does anyone have a clue how to

UIStatusBarStyle doesn't change

孤者浪人 提交于 2019-12-08 10:56:04
问题 I'm working on a swift app and I wanna change the UIStatusBarStyle according to the app's theme (there are 2 options - light and dark theme). I have set View controller-based status bar appearance to NO in the info.plist and in the UIViewController I tried to set it based on the current theme like so: override var preferredStatusBarStyle: UIStatusBarStyle { return Theme.current.statusBarStyle } protocol ThemeProtocol { // Status Bar var statusBarStyle: UIStatusBarStyle { get } } class Theme {

Status bar detects taps only when the UIWebView is scrolled down a bit

给你一囗甜甜゛ 提交于 2019-12-08 05:13:56
问题 I have a UIWebView as the root view of a UINavigationController . When a webpage finishes to load, I hide the navigation bar, and I'm looking for a way to show it back. Right now, I'm trying to do that when the user taps the status bar (this approach looks to me more complicated than what I want). In order to accomplish this, firstly I get the scrollView of the webView: for (id subview in mainWebView.subviews) { if ([[subview class] isSubclassOfClass: [UIScrollView class]]) { ((UIScrollView *

ios上 更改 状态栏(UIStatusBar)的颜色,你值得一看、收藏

…衆ロ難τιáo~ 提交于 2019-12-07 21:23:25
作者:shede333 主页:http://my.oschina.net/shede333 && http://blog.sina.com.cn/u/1509658847 版权声明:原创文章,版权声明:自由转载-非商用-非衍生-保持署名 | [Creative Commons BY-NC-ND 3.0][] #IOS上 关于状态栏的相关设置(UIStatusBar) ##知识普及 ios上状态栏 就是指的最上面的20像素高的部分 状态栏分前后两部分,要分清这两个概念,后面会用到: 前景部分 :就是指的显示电池、时间等部分; 背景部分 :就是显示黑色或者图片的背景部分; 如下图:前景部分为白色,背景部分为黑色 注意:这里只涉及到ios7以及更高版本,低版本下面的讲解可能无效。 ##设置statusBar的【前景部分】 简单来说,就是设置显示电池电量、时间、网络部分标示的颜色, 这里只能设置两种颜色: 默认的黑色( UIStatusBarStyleDefault ) 白色( UIStatusBarStyleLightContent ) 可以设置的地方有两个:plist设置里面 和 程序代码里 ###1.plist设置statusBar 在plist里增加一行 UIStatusBarStyle (或者是“Status bar style”也可以),这里可以设置两个值,就是上面提到那两个

How to use modalPresentationCapturesStatusBarAppearance = NO with a custom UIPresentationController?

半腔热情 提交于 2019-12-07 10:17:16
问题 I have a custom UIPresentationController and overrides frameOfPresentedViewInContainerView for a custom viewController presentation. Everything works fine, except for the status bar. I do not want the status bar to change appearance at all – it should just stay however it looked before. Now the Apple Documentation: https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/#//apple_ref/occ/instp/UIViewController/modalPresentationCapturesStatusBarAppearance

Set status bar orientation in iOS 6.0 [duplicate]

北城以北 提交于 2019-12-07 06:52:13
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: setStatusBarOrientation:animated: not working in iOS 6 In iOS 6.0, as AppDelegate by default extends UIRepsonder and not UIApplication there is no global sharedApplication object. Am I missing anything? I am trying to set status bar orientation using following and it doesn't seem to work anymore. I tested it on iOS 6.0 simulator. I know you can set status bar tint color from the plist settings but can anyone

UIStatusBarStyleBlackTranslucent is not available on this device

眉间皱痕 提交于 2019-12-07 05:12:08
问题 I have a UIActionSheet for iPad which has three options : Cancel Camera Photo Library When I touch the "Photo Library" option I get a crash and a message UIStatusBarStyleBlackTranslucent is not available on this device. I read this post, but didn't figure it out. Can someone help me? Update : -(void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex { if (buttonIndex == 0) { imgController = [[UIImagePickerController alloc] init]; imgController.allowsEditing =

iphoneX not call prefersStatusBarHidden

被刻印的时光 ゝ 提交于 2019-12-07 04:56:43
问题 info.plist <key>UIViewControllerBasedStatusBarAppearance</key> <true/> UIViewController override var prefersStatusBarHidden: Bool{ return true } when i use 6p ,it's ok but iphoneX ,it's can't call and StatusBar not hidden 回答1: You need to check if your view controller is included in a container (i.e. UINavigationController ). If that is the case, the full procedure is this: 1) Set the View controller-based status bar appearance value in info.plist file to YES 2) In your child controller add

View doesn't go under status bar and status bar is black

好久不见. 提交于 2019-12-06 01:06:54
I'm hiding the Navigation Bar on one of the screens, and if is set: navigationController?.navigationBarHidden = true The status bar becomes black. Also, the image doesn't fit all the screen (see the screenshot). If I comment this line, Navigation bar stays on screen, and the status bar is white. Full code: override func viewWillAppear(animated: Bool) { navigationController?.navigationBarHidden = true navigationController?.navigationBar.setBackgroundImage(UIImage(), forBarMetrics: .Default) navigationController?.navigationBar.translucent = true navigationController?.navigationBar

iOS JASidePanel status bar customization

痞子三分冷 提交于 2019-12-05 14:53:12
I am using JASidePanels in my app and everything is so far so good. My design team have come up with a UI design like this, when the side panel is shown or revealed, But I am able to reproduce like! this. What all I have tried so far: I tried setting the center panels background color to the image that I have in the right panel - No luck. I tried setting the sidePanel.view.backgroundColor and also tintColor - No luck. Any help is appreciated! This is JASidePanels's bug , however they fixed the issue by doing this: in the JASidePanelsController add below code to _adjustCenterFrame - (CGRect)