1

This is how the Navigation Bar in my App looks like: enter image description here

This is how I want it to look like (iTunes App, video page): enter image description here

What can I do to achieve this bright colorful blur effect in my navigation bar?

Here's the code I use so far:

navigationController.navigationBar.barTintColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.5];
navigationController.navigationBar.tintColor = [UIColor colorWithRed:88.0/255.0 green:204.0/255.0 blue:249.0/255.0 alpha:1.0];
navigationController.navigationBar.translucent=YES;
NSDictionary *navbarTitleTextAttributes =  [NSDictionary dictionaryWithObjectsAndKeys:
                                            [UIColor colorWithRed:1 green:1 blue:1 alpha:1.0],UITextAttributeTextColor,
                                            [UIColor clearColor], UITextAttributeTextShadowColor,
                                            [NSValue valueWithUIOffset:UIOffsetMake(-1, 0)], UITextAttributeTextShadowOffset, nil];
[[UINavigationBar appearance] setTitleTextAttributes:navbarTitleTextAttributes];
DeveloBär
  • 673
  • 8
  • 20

1 Answers1

1

Set your navigationaBar style to Translucent.

self.navigationController.navigationBar.barStyle = UIBarStyleBlack;
self.navigationController.navigationBar.translucent = YES;
Anindya Sengupta
  • 2,539
  • 2
  • 21
  • 27
  • 2
    To add to this answer, that default blur effect will only work for bars with a background color. If you set a background image, it will not have a blur (if it is translucent it will just have regular translucency). There are also some issues with desaturation of colors in the navigation bar. More info [here](http://stackoverflow.com/questions/18897485/achieving-bright-vivid-colors-for-an-ios-7-translucent-uinavigationbar) and [here](http://stackoverflow.com/questions/18895252/get-the-right-color-in-ios7-translucent-navigation-bar) – Dima Mar 21 '14 at 01:06
  • Yeah that's it, the "UIBarStyleBlack" did it for me Thanks a lot! – DeveloBär Mar 21 '14 at 01:09