Status bar color on ios7 - colors

My question would be that how can you set the status bar to a default color in ios7. (Like in the latest update of Facebook and Twitter app)
Thanks a lot!

The status bar doesn't have a color - it's transparent. The color you are seeing in the new Facebook app is the navigation bar that has been extended under the status bar. In iOS 7 your status bar can be transparent with white text, transparent with black text, or opaque (black). It can't be tinted, but you can give the illusion of a tint by extending your navigation bar.
iOS 7 introduces the concept of extendable view edges to allow for this sort of thing. You might want to review the UI transition guide or UIViewController documentation for more information.

It looks like you can assign a background image to the navigation bar and whatever alpha/ opacity that image has, will be picked up by the status bar.
Create your image 640x128 and whatever colour/pattern you want.
[self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:#"image.png"] forBarMetrics:UIBarMetricsDefault];
This will make the picture the background of the navigation bar and the status bar.

Related

How to set status bar color to the same color than the app bar color?

I'm new to Android development. I use jetpack compose.
The TopAppBar color elevates as you scroll. That's fine, but I also want to elevate the status bar at the same time to the same color.
For example, Google clock app has the feature I want to achieve.
What I have tried:
Setting the status bar color to transparent:
val systemUiController = rememberSystemUiController()
systemUiController.setStatusBarColor(color = Color.Transparent)
Displaying content behind the status Bar
window.setFlags(
WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS,
WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS
)

How do I change the color of the navigation bar icons? (Android studio)

To avoid confusion as to what the navigationbaractually is, here's a
As you can see, I've added a new color instead of the standard black color using:
<item name="android:navigationBarColor">#color/colorBackground</item>
But the icons are barely visible now, so I would like to change them into being black, or at least darker. I have searched SO and the webb but came up empty handed. Any ideas?
You cannot change the color of the buttons yourself.
However you can try to set the navigationbarlight to true. It should be noted that this is only available from API level 27.
windowLightNavigationBar
added in API level 27
int windowLightNavigationBar
If set, the navigation bar will be drawn such that it is compatible
with a light navigation bar background.
For this to take effect, the window must be drawing the system bar
backgrounds with windowDrawsSystemBarBackgrounds and the navigation
bar must not have been requested to be translucent with
windowTranslucentNavigation. Corresponds to setting
SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR on the decor view.
May be a boolean value, such as "true" or "false".
source

How to allow UIView lie under status bar in iOS 10?

How to allow UIView lie under status bar like on the picture below?
Originally answered here.
If you're using Safe Area Layout Guides you can do this completely in Interface Builder.
Pin the view you want under the status bar to the main view using the Top Space to Container Margin constraint instead of Top Space to Safe Area constraint.
Then on the Size Inspector for the main view, uncheck Safe Area Relative Margins.
Just make sure that you've set your top space constraint equals 0 to your superview, not to the Bottom Layout Guide in the Storyboard.
In order to make status bar style like in the screenshot (white text, transparent background) you may want to set it's style to .lightContent.
You can set the status bar style to light content.
1. Add this key-val to your .Plist.
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
2. In your App Delegate class, add the following to didFinishLaunch method.
UIApplication.shared.statusBarStyle = .lightContent
Here are the relevant link.

Change Navigation View Color Sencha Architect

I'm starting with Senchar Architect 2 and I want to change the Navigation View Top bar color,
I want a red color on navigation bar, i saw another 2 questions but I don't undertood, have a simple way to change de color ? Using CSS or the Config Panel of sencha architect
Yes, you CAN change the color of your navigation bar in the config panel (like you did for the back button color yesterday) --> Style --> Background: red.
Also, I would suggest you to take a look at the SASS theming which is recommended by Sencha folks.
Here is the link:
http://vimeo.com/36917216

Monotouch - Set TintColor of UISearchBar

I'm using a UISearchDisplayController and I'm trying to set the TintColor of the UISearchBar. The problem is that the color does not come though correctly. In interface builder the color of the search bar is correct after setting the tint property, but when the app runs, the search bar will be the same color, just a lot lighter. E.g. If I set the TintColor to black in interface builder it looks right in the designer, but when I run the app the color will come though medium grey.
I have also tried setting it in code like below, with no luck.
SearchDisplayController.SearchBar.TintColor = UIColor.Black;
Any Ideas? I'm a bit lost on this one.
This seems to be a bug in iOS 5/6. Happens to me when I connect the search bar to a search display controller, but not otherwise.
How I (strangely) fixed it:
Add a segmented controller to your view, change it's tint color to your desired color. Now you will get the right color on your search bar as well.
I did not try it in Xcode but, API wise, UISearchBar has both a BackgroundColor and a TintColor and they are not identical. What you describe (grey'ing) is normal when using TintColor while using BackgroundColor should give you a pure color.

Resources