How to set a picture programmatically in a NavBar?

后端 未结 4 558
温柔的废话
温柔的废话 2020-11-29 14:11

I have a detailview with a navigation bar with a back button and a name for the view. The navigation bar is set programmatically. The name presented is set like this.

<
4条回答
  •  时光说笑
    2020-11-29 14:40

    You need to subclass UINavigationBar. Then in drawRect do something like:

    [[UIImage imageNamed...] drawInRect:...]
    

    and call the super method ofcourse

提交回复
热议问题