Search code examples
iosobjective-cuinavigationbaruisearchcontroller

How to have a completely customised navigation bar for IOS using XCODE Objective C


I need to customize my navigation bar in my xcode project in such a way (as shown in figure below)

enter image description here

that there is an increase in height of navigation bar, and there is a search bar in the middle and a home button to the left and a help button to the right.country and account access on the the top right aside to the help button. I want to make this navigation bar available in all screens in my application.

Please ask me if you need anymore information regarding the question.


Solution

  • Try using following steps:

    1. Hide your navigation bar.
    2. Add UIView with same frame as Navigation bar (0, 0, 320, 64)
    3. Use UIButton instead of BarButtonItem and UILabel in place of navigation titlebar
    4. And your customised navigation bar design is ready!!
    5. Now set actions on Left button to perform pop operation.

    Try and let me know, if you can’t do it.