2

I am trying to add custom view on navigation bar. I am not sure how to implement it. Any help appreciate.

2 Answers 2

3

You can implement custom view on navigation bar easily. Check the below it will be helped.

Custom View Navigation Top Bar

Hoping it will be helped.

Sign up to request clarification or add additional context in comments.

Comments

-1

This is a example of how to add a Image instead of a Title String

func setupTitle(){

    let logo = UIImage(named: "ImageFileName")
    let imageView = UIImageView(image:logo)
    imageView.contentMode = .scaleAspectFit

    self.navigationItem.titleView = imageView
    self.navigationController?.navigationBar.prefersLargeTitles = false
}

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.