remove tab bar blurred effect - ios

Is there any away to remove tab bar blurred effect
I set background image and it looks like the first picture.
If I make it transparent, you can see the table through it like the second picture.
I want to make it like the third picture

You can make it transparent using
the barTintColor property.
nameOfTabBar.barTintColor = .clear
This property is incharge of the tint color to apply to the tab bar background.
You can find more information on https://developer.apple.com/documentation/uikit/uitabbar

Related

How can I set the color of a custom back arrow image with UINavigationBarAppearance?

I have an iOS app that uses a custom back chevron for the back button in navigation bars with custom background colors and shadows and such. I'd like to set the color of that back indicator image to something besides the default blue. How do I do that with the new UINavigationBarAppearance APIs?
I have tried:
Setting the back indicator image to a template image of my shape - this works, but doesn't affect the color.
Setting titleTextAttributes on the normal variant of the buttonAppearance, specifying NSForegroundColorAttributeName
Setting titleTextAttributes on all variants of the backButtonAppearance, specifying NSForegroundColorAttributeName and NSBackgroundColorAttributeName
Setting tintColor on the navigation bar directly - this affects the back indicator during animation of a new navigation item, but at the end of the animation it goes back to blue.
The tintColor works for me. The attached screencast shows (using slow animations) that having set the tint color to black, it stays black, both pushing and popping:

Set Statusbar color to same as Nav Bar

I want the Status Bar of my app to have the exact same color as my Navigation Bar. The way I found to change the color of the Status Bar was just by creating a view in the size of the Status Bar and change the background color.
However even though I use the color picker from the Nav bar to set the color of the view I get 2 totally different colors as seen in the picture below.
I've tried mixing with the color picker, changing opacity etc, however I'm never able to hit the correct color. Any ideas on how I can get the exact same color for the status bar?
The color of the UIStatusBar is automatically set to match the color of the UINavigationBar when you set the value of self.navigationController.navigationBar.barTintColor. Is there a reason you need to set them separately?
You can do the following:
Create an UIImage containing only the color you want with a size of 64x1. You could render that image in code.
Set the image as a background image for the navigationBar. Something like:
navigationController.navigationBar.setBackgroundImage(image, for: .default)

How to make nav bar transparent with white font?

I just want to make my UINavigationBar to look like this:
If I tap on the translucent UIButton in Xcode, it's not translucent. The only solution is to set the alpha value to 0.5, but then I won't have my font opaque and the navigation items as on this image. So I think I am looking for translucent and blur effects.
I had no trouble getting this, simply as a black translucent nav bar:
It is definitely a dark blurred version of what's behind it; look how it's brighter on the right, where there's a bright patch in the picture.
I can get a gentler blur by using a clear navigation bar with a visual effect view behind it:
What they are actually using, however, is a matter of opinion.

Getting the right tint for back button

I am trying to achieve this look for my back button:
But no matter where I sample the shade of green in photoshop, it never comes out correct. For example:
Any suggestions on how I can achieve the exact same look?
The tint color is exactly that—a tint. iOS uses that color as a base to create a nice-looking button in the style of normal navigation bars.
If you want to control your button's appearance more precisely than tinting allows, your best bet is to create a set of images and use -setBackButtonBackgroundImage:forState:barMetrics: to use them. If you want this look for all bar button items in your app, use that method on +[UIBarButtonItem appearance], rather than a specific bar button item.
In order to produce the BackBarButtonItem's gradient, iOS does the following:
Applies the tint color that you specify
Applies a transparent overlay on top of the back button
Here are the retina-display overlays it uses for iPhone (these were obtained using UIKit-Artwork-Extractor):
Default Back Button Overlay
Pressed Back Button Overalay
Unfortunately, there is no way to tell iOS / UIBarButtonItem NOT to render these overlays on the back button (thereby, this gives the default navigation bar and buttons a pretty consistent look across all apps).
If you don't want to have this overlay applied (it will darken the button in both states), you have to create your own back button images - for the default and pressed states, portrait and landscape orientations, and retina and non-retina displays (8 total images).
As Brent Royal-Gordon mentions in his answer, you can apply these images using the appearance proxy for UIBarButtonItem to have them used throughout the app. In example, you'd set the default background image state like this for portrait orientation:
UIImage *defaultBackImage = [UIImage imageNamed:#"My-Default-Back-Button"];
[[UIBarButtonItem appearance] setBackButtonBackgroundImage:defaultBackImage forState: UIControlStateNormal barMetrics:UIBarMetricsDefault];
It looks like the button is adding another semi-transparent gray layer over the button. I can't check right now but I would look for settings to disable the semi-transparent layer effect or try different button style/states.

UITabBar remove the black background

As the title states, I haven't been successful in removing the black background in the UITabBar.
I know it is possible to add a subview on top of it. But I want it to be transparent so if I add a transparent subview on top of it, it will just have the underlying black color.
Setting the tintColor made me able to change the color of the UITabBar, but when I change it to clearColor it will just be black again.
Anybody know how to remove the underlying image or color so it will be transparent?
When they added the tintColor property in iOS 5, they also added a number of other appearance-customization functionality to UITabBar. See, backgroundImage and selectionIndicatorImage, and the finishedSelectedImage and finishedUnselectedImage properties of UITabBarItem.

Resources