Make NavigationBar's titleView larger than itself

前端 未结 3 1249
挽巷
挽巷 2021-01-14 13:51

I want to place an image in the middle of a navigation bar that is bigger then the bar itself. So far I tried to use a UIView with a UIImageView inside and it works quite we

3条回答
  •  -上瘾入骨i
    2021-01-14 14:24

    You could try to put the code in the viewWillAppear method. This way you will add the image to the bar everytime the view appears. However you should then remove the inageview within the viewDidDissappear method. If you need it in several views you could subclass the UIViewController and use this one.

提交回复
热议问题