Currently i am working in iPhone app, I have two screen like A and B, A has no navigation bar, but B has navigation bar. so i set like this.
Class A:
Your code is okay for Hide and Unhide the navigationBar. The problem is that you're hiding Class A's navigationBar in viewWillAppear: which is called just before appearing the view so before loading the Class A view navigationBar is being hidden each time.
And if we talk about your blue color i think it is your window color. Because after hidden the navigationBar there will be a space above your self.view which height is 44.0. So there are three options to fixed it.
Class A's navigationBar in Class A's viewDidAppear: method.window color what you want to show.window background in which at top of image make a navigationBar same as Class B's navigationBar so when the original navigationBar will be hide it will see.