How to make UINavigationBar background transparent?
<p>First of all,
I've seen all the answers at <a href="https://stackoverflow.com/questions/27228317/how-to-make-uinavigationbar-transparent-in-ios-8">How to make UINavigationBar Transparent in IOS 8?</a> <a href="https://stackoverflow.com/questions/21850622/transparent-uinavigationbar">Transparent UINavigationBar</a> and <a href="https://stackoverflow.com/questions/2315862/make-uinavigationbar-transparent">Make UINavigationBar transparent</a>.</p>

<p>They just don't seem to work for me.</p>

<p>My regular view controller (before trying to make the navigation bar transparent) doesn't have any issues:</p>

<p><a href="https://i.stack.imgur.com/NV89B.png" rel="noreferrer"><img src="https://i.stack.imgur.com/NV89B.png" alt="enter image description here"></a></p>

<p>I'm using (tried both in <code>viewDidLoad</code> and <code>viewWillAppear:</code>):</p>

<pre><code>[self.navigationController.navigationBar setBackgroundImage:[UIImage new]
                                              forBarMetrics:UIBarMetricsDefault];
self.navigationController.navigationBar.shadowImage = [UIImage new];
self.navigationController.navigationBar.translucent = YES;
self.navigationController.view.backgroundColor = [UIColor clearColor];
</code></pre>

<p>I'm getting this:</p>

<p><a href="https://i.stack.imgur.com/iYqMC.png" rel="noreferrer"><img src="https://i.stack.imgur.com/iYqMC.png" alt="enter image description here"></a></p>

<p>Gray status bar background, completely white navigation bar which doesn't blend with the status bar, and then the view starts. All the 'solutions' at the other questions' answers' yield the same result for me.</p>

<p>I've also tried setting <code>self.edgesForExtendedLayout = UIRectEdgeNone;</code> or <code>self.edgesForExtendedLayout = UIRectEdgeAll;</code> but that also didn't have any impact.</p>

<p>How can I make my navigation bar transparent without messing up everything?</p>

<p><strong>UPDATE:</strong> Following Warif Akhand Rishi's answer, I've changed <code>self.navigationController.view.backgroundColor = [UIColor clearColor];</code> to <code>self.navigationController.navigationBar.backgroundColor = [UIColor clearColor];</code>, now I'm getting a gray, unified status/navbar, but still not transparent:</p>

<p><a href="https://i.stack.imgur.com/anQCD.png" rel="noreferrer"><img src="https://i.stack.imgur.com/anQCD.png" alt="enter image description here"></a></p>

<p><strong>UPDATE 2:</strong> I've hooked up the view debugger, and that gray background seems to come from deep down from the roots of view hierarchy, and my view's content is not extending up. I've tried <code>self.edgesForExtendedLayout = UIRectEdgeAll;</code> again with the latest code but still no avail:</p>

<p><a href="https://i.stack.imgur.com/lGMje.png" rel="noreferrer"><img src="https://i.stack.imgur.com/lGMje.png" alt="enter image description here"></a></p>