I had tried to implement Navigation Controller which embeds in my View Controller. It works as expected.
But my requirement is slightly different which needs only a back button and already have a top banner with logo image background in all the screens . So if I try to implement back button it takes the space for the navigation bar which covers the Logo/top banner.
Is there any way to overcome this scenario .
That seems pretty easy, by the following code used in my app too:-
Edit:-
To remove back button text:-
Swift 3.0
I don't know is there any other option or not. But in the past i have same scenario as you.
I have created custom .XIB with UIView. and Add subview it to as Navigationbar.
So, According to me the best option is , create custom .XIB with Height of UINavigation bar. and Add as subview.
Here is step how you can achieve it.
1) Take .h file , .m file and Xib of UIView with size of width 46 and height 44
2) Set constrain and layout according to your suitable design.
3) Give outlet to Back button in .h file.
4) Create one delegate in customview.h file . set method in .m file.
5) then import customview.h file in your viewcontroller.h file . As same don't forget to define delegate in viewcontrollers interface. <>
6) Now add customheaderview as subview in your Viewdidload method.
7) Access it in your all view controller with delegate method of headerview.
Now you can do anything in navigationbar like you do in UIView.
Note:- I know it is tedious process. but it is worth when you need 3 or 4 button in navigation bar and set Action on it . or need same design layout for whole project in navigationbar..