In iOS 7 navigation bars have a blur effect for content that is scrolled underneath. I would like my navigation bar to be transparent, which is achieved like so:
[[UINavigationBar appearance] setBarStyle:UIBarStyleDefault];
[[UINavigationBar appearance] setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault];
[[UINavigationBar appearance] setShadowImage:[UIImage new]];
[[UINavigationBar appearance] setBackgroundColor:[UIColor clearColor]];
But I would like the content to blur as well. I tried the following with no luck:
[[UINavigationBar appearance] setBarTintColor:[UIColor clearColor]];
[[UINavigationBar appearance] setBarStyle:UIBarStyleDefault];
[[UINavigationBar appearance] setShadowImage:[UIImage new]];
[[UINavigationBar appearance] setBackgroundColor:[UIColor clearColor]];
Instead, this makes the navigation bar blur the content view but is black. If I remove the setBarTintColor
, the navbar blurs the content but it's white. I've tried various other combinations but the navbar is either white or black.
I've looked at several SO questions but they don't help me. They answer how to get a completely transparent navbar or get a certain colour, when all I want is it to be clear/transparent, without any kind of colour tint.
How would I achieve this? Thanks for any help, it's appreciated!