Transparent UINavigationBar

I'm having issues with the fact that my UINavigationBar is completely transparent and it only displays white text and buttons, so the ImageView that I use for the background of the ViewController is fully visible at the top.

I tried this code among others:

    // Set the BarTintColor to translucent and text colors to white
self.navigationController.navigationBar.barTintColor = [UIColor clearColor];
self.navigationController.navigationBar.titleTextAttributes = [NSDictionary dictionaryWithObject:[UIColor whiteColor] forKey:UITextAttributeTextColor];
self.navigationController.navigationBar.tintColor = [UIColor whiteColor];

But this is a blackish UINavigationBar result , how can I solve this?

The application will move from this ViewController to this ViewController where the UINavigationBar disappears to red. There are several other ViewControllers that make the same fade animation, so a UINavigationBar is required

Part of the first ViewController with the "Ny" button will be improved;) - I'm just working on how to access a tool, such as Photoshop

Thank! Erik

+4
source share
3 answers

This is what I use to make the navigation bar transparent:

[self.navigationController.navigationBar setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault];
self.navigationController.navigationBar.translucent = YES;
+6
source

add this

self. navigationController.navigationBar.translucent = YES;
0
source

I found this very similar question . Also with an example on Gist

0
source

All Articles