Question

I searched and tried as below, but doesn't work. In fact, event set translucent = YES can't make the navigation bar translucent.Does anyone know?

self.navigationController.navigationBar.tintColor = [UIColor blueColor];
self.navigationController.navigationBar.alpha = 0.7f;
self.navigationController.navigationBar.translucent = YES;
Was it helpful?

Solution

It's late, but if anyone need the answer here it is.

If you want transparency in all navigationBar than write following lines in your AppDelegate's -(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions method:

## Objective C ##

[[UINavigationBar appearance] setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault];
[[UINavigationBar appearance] setShadowImage:[UIImage new]];
[[UINavigationBar appearance] setTranslucent:YES];

## Swift ##

UINavigationBar.appearance().setBackgroundImage(UIImage(), forBarMetrics: UIBarMetrics.Default)
UINavigationBar.appearance().shadowImage = UIImage()
UINavigationBar.appearance().translucent = true

For transparency in particular view, check this answer.

OTHER TIPS

It should work if you click on the segue between the 2 views in storyboard, then in the attribute "Inspector -> in presentation" select "over Full Screen"

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top