Blur UINavigatonBar with custom color in iOS 7

I am looking for a solution on how to make NavBar in an iOS application, as in the screenshot below:

enter image description here

You can see that the contents in the NavBar are blurry and the NavBar is colored.

When I try to add NavBar to my project without changing color, everything is fine:

enter image description here

But after I set the custom color of my NavBar, the blurry content below it becomes almost invisible:

enter image description here

If you change the alpha color of the bar, then the contents will become visible, but with a gray tint:

enter image description here

How can I get the same result as in screenshot 1?

+4
source share
3 answers

Just install barStyleon UIBarStyleBlack.

0
source

,

    self.navigationController.navigationBar.barTintColor = [UIColor colorWithRed:1.000 green:0.000 blue:0.502 alpha:1.000];

, ( .. , ..) enter image description here

enter image description here

, .

+3

You can use a custom image that has the effect you're looking for. Then you can use custom buttons to replicate navigation. Make sure you delete the check on “Displays the navigation bar” in “Bar visibility” for your navigation controller.

0
source

Source: https://habr.com/ru/post/1525262/


All Articles