putting labels, buttons on the navigation bar iOS

前端 未结 5 1678
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-13 11:59

I have created custom navigation controller,

I want to be added, a date at the left, a back button on the right and the title next to back button.

I tried to

5条回答
  •  说谎
    说谎 (楼主)
    2021-01-13 12:44

    You can also achieve this from Interface Builder

    1. First add a UIView which will look like following

    2. Then add a UILabel inside the UIView which will look like following

    3. In the Center It will look like following

    Now add necessary constraint to meet your requirement.

提交回复
热议问题