uistatusbar

Set status bar orientation in iOS 6.0 [duplicate]

你。 提交于 2019-12-05 12:04:44
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 please tell me how to set status bar orientation programmatically in iOS 6.0? [[UIApplication sharedApplication] setStatusBarOrientation:UIDeviceOrientationPortrait

How to change UIViewControllerBasedStatusBarAppearance to YES/NO programmatically in iOS 7?

江枫思渺然 提交于 2019-12-05 10:29:35
My application has a dark background, but in iOS 7 the status bar became transparent. So I can't see anything there, only green battery indicator in the corner. How can I change the status bar text color to Green or Orange like it is on the home screen? I know about Set the UIViewControllerBasedStatusBarAppearance to YES in the plist In viewDidLoad do a [self setNeedsStatusBarAppearanceUpdate]; Add the following method: -(UIStatusBarStyle)preferredStatusBarStyle{ return UIStatusBarStyleLightContent; } How can I change UIViewControllerBasedStatusBarAppearance programmatically? Thanks in advance

iphoneX not call prefersStatusBarHidden

雨燕双飞 提交于 2019-12-05 10:21:19
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 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 this code: override var prefersStatusBarHidden: Bool{ return true } 3) Add this extension: // gives control

UIStatusBarStyleBlackTranslucent is not available on this device

痞子三分冷 提交于 2019-12-05 10:13:27
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 = YES; imgController.sourceType = UIImagePickerControllerSourceTypeCamera; imgController.delegate=self;

How to cover also the UIStatusBar with UIView when i cover all the screen with the UIView? (iPhone)

左心房为你撑大大i 提交于 2019-12-05 04:16:28
问题 How to cover also the UIStatusBar with UIView when i cover all the screen with the UIView? 回答1: I was battling how to do this for a long time too! Finally figured it out :) The key is to set the windowLevel of your new window to really high so it lives on top of all the other windows/views/statusbar etc: UIWindow *keyWin = [UIApplication sharedApplication].keyWindow; UIWindow *hudWindow = [[UIWindow alloc] initWithFrame:CGRectMake(0.0f, 0.0f, keyWin.frame.size.width, keyWin.frame.size.height)

How to show double height green statusbar (In-Call) in foreground app on device?

我怕爱的太早我们不能终老 提交于 2019-12-05 04:03:41
There's a lot of questions here asking for displaying a red recording bar while in background. It's totally clear I should use AVAudioSession category AVAudioSessionCategoryPlayAndRecord for that. My question is how can I display a green In-Call bar (or at least red bar) in a foreground app when having an active VOIP call in my app? So I could return to call UI tapping a statusbar area, just like Whatsapp or Skype does. What I've already tried: voip and audio modes in UIBackgroundModes key in Info.plist + setCategory:AVAudioSessionCategoryPlayAndRecord + setActive as suggested in this SO

UISearchController changing status bar color on invocation

╄→гoц情女王★ 提交于 2019-12-04 10:45:11
问题 I have the following code in my app, specifically in viewDidLoad: that sets up my UISearchController . self.searchController = [[UISearchController alloc] initWithSearchResultsController:nil]; self.searchController.searchResultsUpdater = self; self.searchController.hidesNavigationBarDuringPresentation = NO; self.searchController.dimsBackgroundDuringPresentation = NO; self.definesPresentationContext = NO; self.searchController.searchBar.scopeButtonTitles = @[]; self.searchController.searchBar

Status bar font is bold for some reason

做~自己de王妃 提交于 2019-12-04 05:58:42
问题 The clock, carrier, battery part in my device is normal, like in 1st picture. When I open my app, after loading the app in memory it starts to animate and make the navigation bar bold and bigger font. I am not even sure if this is a good or bad thing, but I would like to know how this happened. Here is how I setup the rootVC if it has anything to do with this issue: window = UIWindow(frame: UIScreen.mainScreen().bounds) window!.rootViewController = VCOrganizer.LaunchVCHolder window!

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

孤街浪徒 提交于 2019-12-04 04:57:58
问题 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.

iOS8: How do I make statusBar opaque after navigationBar is hidden using hidesBarsOnSwipe?

谁都会走 提交于 2019-12-04 01:34:35
I am building iOS8 app. On my tableview controller, I am using self.navigationController.hidesBarsOnSwipe = YES, to hide the navigationBar on swipe up gesture. It is working nicely, but my statusBar becomes transparent and shows the table content underneath. On storyboard, Status Bar are Top Bar are set to "Inferred" I want to: 1. Keep my status bar opaque 2. Maintain the same color as the navigationBar 3. Table content scrolls underneath the statusBar Thank you. Here is a Swift solution: First, change UITableViewController to UIViewController and add a tableView field. Then, implement your