uistatusbar

A way to calculate or get wifi strength on Swift on iOS 11

↘锁芯ラ 提交于 2019-12-11 05:26:46
问题 Looking for a way to either get or calculate the wifi strength of a device? Have seen examples of scraping the status bar but cannot get it to work on iOS 11: func getSignalStrength() -> Int { let application = UIApplication.shared let statusBarView = application.value(forKey: "statusBar") as! UIView let foregroundView = statusBarView.value(forKey: "foregroundView") as! UIView let foregroundViewSubviews = foregroundView.subviews var dataNetworkItemView:UIView! for subview in

UIStatusBar changes style for no apparent reason

倾然丶 夕夏残阳落幕 提交于 2019-12-11 03:36:23
问题 I have an app in which I set the UIStatusBarStyle to UIStatusBarStyleLightContent and it works perfectly fine for a while. Then, as suddenly than unexpectedly, it changes to UIStatusBarStyleDefault for no apparent reason. View controller-based status bar appearance property is set to NO . Is there a specific place which I should set the UIStatusBarStyle in? Currently I set it in - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions before

full screen background image while using uinavigationcontroller

≡放荡痞女 提交于 2019-12-11 01:38:42
问题 I have an UINavigationController with UINavigationBar hidden = YES. I want full screen bg for view that embedded in UINavigationController. But I get only that: http://cs616618.vk.me/v616618797/1bf0d/FEdIn0Nn4x8.jpg Is it possible to make it full screen under status bar? I achieved that with standalone view controller, but while using it in UINavigationController it becomes like on image. 回答1: Check that all your view controllers are correctly configured: The UINavigationController : The

Best Practice to handle the extended height status bar with a WantsFullScreenLayout app?

淺唱寂寞╮ 提交于 2019-12-10 18:20:00
问题 In an app which has the wantsFullScreenLayout set to YES , what is the best practice to handle an extended height status bar, i.e. with the extra status bar presented when a phone call or a VoIP app is present, or when the personal hotspot feature is activated? Is the UIApplicationWillChangeStatusBarOrientationNotification notification (or the corresponding delegate method of UIApplication the right way to do it, or am I overlooking something obvious? I have put up a little sample project

Storyboard-set iOS 7 Status Bar not shown in right style

一曲冷凌霜 提交于 2019-12-10 18:01:45
问题 I have two Scenes in a Storyboard; a dark one and a light one. Set to Default in the Simulated metrics' Status Bar section, the light scene's bar is dark and works correctly. The dark scene's is set the same way to Light Content style but it doesn't change. No mention of the bar anywhere in the code itself, what's wrong? 回答1: The simulated metrics is only for XCode. You need to set this for the view in the views viewcontroller. UIViewController:preferredStatusBarStyle StackoverFlow question

Swift UIApplication.setStatusBarStyle Doesn't work

走远了吗. 提交于 2019-12-10 17:22:14
问题 Here's my implementation in a subclass of UIViewController : override func viewWillAppear(animated: Bool) { super.viewWillAppear(animated) UIApplication.sharedApplication().setStatusBarStyle(UIStatusBarStyle.LightContent, animated: false) } I tried putting it in AppDelegate initialisation code (using the passed in UIApplication instance), however the status bar is still black.. Is this a bug with iOS 8 or am I doing it wrong? Note: I may be breaking someone's law's here by discussing ios 8..

How to change iOS status bar color in child view controller

这一生的挚爱 提交于 2019-12-10 12:47:21
问题 (iOS 7 Xcode 5.0.2) I used following methods, successfully change the status bar color to white on root view controller [self setNeedsStatusBarAppearanceUpdate]; // Update status bar style -(UIStatusBarStyle)preferredStatusBarStyle { return UIStatusBarStyleLightContent; // Set status bar color to white } Now I'm trying to change status bar color to black when navigate to child view controller, I don't know how to do it.(status bar color is still white) I searched, and find this method:

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

落爺英雄遲暮 提交于 2019-12-10 10:19:07
问题 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)

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

梦想的初衷 提交于 2019-12-10 02:56:32
问题 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

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

核能气质少年 提交于 2019-12-09 15:05:01
问题 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. 回答1: Here is a Swift solution