uistatusbar

UINavigationBar/Status Bar issue in IOS7

北慕城南 提交于 2019-11-27 09:22:07
问题 Final EDIT (Rather than having an overly long question with edits making a final edit for clarification, please see other edits if needed). Controller Setup I have an application that is setup as follows: InitialViewController (subclass of ECSlidingViewController) Main Navigation Controller (subclass of UINavigationController ) Main Home View Controller (subclass of UIViewController ) In the viewDidLoad of the initialViewController I load the main navigation controller in with the Home View

IOS7 Status bar hide/show on select controllers

▼魔方 西西 提交于 2019-11-27 06:48:23
I would like to show and hide the Status bar on some controllers. Can this be done or is it more of an overall app setting. I have seen many posts/questions about the plist update: View controller-based status bar appearance - NO If this is completed what control is then given? I am looking to show the status bar on the main screen of the application. But for example on a side (slide) menu I would like it not to show, is this possible? Can this be changed in IB or code? EDIT -- I am using a https://github.com/edgecase/ECSlidingViewController implementation. The main controller (showing the

UIStatusBarStyle PreferredStatusBarStyle does not work on iOS 7

蓝咒 提交于 2019-11-27 06:04:19
In my iPhone application built with Xcode 5 for iOS 7 I set UIViewControllerBasedStatusBarAppearance=YES in info.plist , and in my ViewController I have this code: -(UIStatusBarStyle) preferredStatusBarStyle { return UIStatusBarStyleLightContent; } But the status bar is still black against the black background. I know its possible to change this app-wide by setting UIViewControllerBasedStatusBarAppearance=NO in info.plist , but I actually need to alter this on a viewController by viewController basis at runtime. I discovered that if your ViewController is inside a navigationController then the

How to prevent UINavigationBar from covering top of view in iOS 7?

早过忘川 提交于 2019-11-26 23:21:53
After updating to Xcode 5, the navigation bars in all of my app's views have shifted down. Here are some screenshots, the first showing everything in the view as it's pulled down, and the second showing all of it untouched. The search bar should begin where the navigation bar. Anyone know how I can fix this? edit: i have tried this previously recommendation: if ([self respondsToSelector:@selector(edgesForExtendedLayout)]) self.edgesForExtendedLayout = UIRectEdgeNone; But it yields very odd results. This may be because I have a "slide menu" under this view controller that is appearing due to

How to set Status Bar Style in Swift 3

放肆的年华 提交于 2019-11-26 15:35:19
I'm using Xcode 8.0 beta 4. In previous version, UIViewController have method to set the status bar style public func preferredStatusBarStyle() -> UIStatusBarStyle However, I found it changed to a "Get ONLY varaiable" in Swift 3. public var preferredStatusBarStyle: UIStatusBarStyle { get } How can provide the style to use in my UIViewController? [UPDATED] For Xcode 10+ & Swift 4.2+ This is the preferred method for iOS 7 and higher In your application's Info.plist , set View controller-based status bar appearance to YES . Override preferredStatusBarStyle ( Apple docs ) in each of your view

IOS7 Status bar hide/show on select controllers

回眸只為那壹抹淺笑 提交于 2019-11-26 12:56:16
问题 I would like to show and hide the Status bar on some controllers. Can this be done or is it more of an overall app setting. I have seen many posts/questions about the plist update: View controller-based status bar appearance - NO If this is completed what control is then given? I am looking to show the status bar on the main screen of the application. But for example on a side (slide) menu I would like it not to show, is this possible? Can this be changed in IB or code? EDIT -- I am using a

How to prevent UINavigationBar from covering top of view in iOS 7?

亡梦爱人 提交于 2019-11-26 12:20:43
问题 After updating to Xcode 5, the navigation bars in all of my app\'s views have shifted down. Here are some screenshots, the first showing everything in the view as it\'s pulled down, and the second showing all of it untouched. The search bar should begin where the navigation bar. Anyone know how I can fix this? edit: i have tried this previously recommendation: if ([self respondsToSelector:@selector(edgesForExtendedLayout)]) self.edgesForExtendedLayout = UIRectEdgeNone; But it yields very odd

Change Status Bar Background Color in Swift 3

六月ゝ 毕业季﹏ 提交于 2019-11-26 08:03:02
问题 In XCode 7.3.x ill changed the background Color for my StatusBar with: func setStatusBarBackgroundColor(color: UIColor) { guard let statusBar = UIApplication.sharedApplication().valueForKey(\"statusBarWindow\")?.valueForKey(\"statusBar\") as? UIView else { return } statusBar.backgroundColor = color } But it seems that this is not working anymore with Swift 3.0. Ill tried with: func setStatusBarBackgroundColor(color: UIColor) { guard let statusBar = (UIApplication.shared.value(forKey: \

preferredStatusBarStyle isn't called

匆匆过客 提交于 2019-11-26 00:56:33
问题 I followed this thread to override -preferredStatusBarStyle , but it isn\'t called. Are there any options that I can change to enable it? (I\'m using XIBs in my project.) 回答1: Possible root cause I had the same problem, and figured out it was happening because I wasn't setting the root view controller in my application window. The UIViewController in which I had implemented the preferredStatusBarStyle was used in a UITabBarController , which controlled the appearance of the views on the

iOS 7: UITableView shows under status bar

╄→гoц情女王★ 提交于 2019-11-26 00:35:34
问题 The first screen of my application is a UITableViewController without a navigation bar, which means that the content flows under the status bar so there\'s a lot of text collisions. I\'ve adjusted both the properties for Under top bars and Adjust scroll view insets which do actually stop it from scrolling under, but at the cost of keeping the top of the table view under. I\'ve attempted to set the UITableView frame to offset by 20 pixels, but it doesn\'t appear to take effect and as I