how to add items in uinavigationbar at a specific position?

后端 未结 6 858
予麋鹿
予麋鹿 2020-12-21 14:41

I am developing one application for iphone and in that i have some issues regarding adding more then one UILabel in navigation bar at a specific position.

6条回答
  •  盖世英雄少女心
    2020-12-21 15:28

    You can set an arbitrary view instead of a view controller's title:

    myViewController.navigationItem.titleView = someView;
    

    Note that most likely the view's frame will be restricted to make room for leftBarButtonItem and rightBarButtonItem.

提交回复
热议问题