putting labels, buttons on the navigation bar iOS

前端 未结 5 1717
佛祖请我去吃肉
佛祖请我去吃肉 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:22

    You need to add navigation item to the navigation bar. One per each navigation level. So you should have at least one of them.

    ** update **

    UINavigationItem * myNavItem = [[UINavigationItem alloc] initWithTitle:@"Some title"];
    
    /*
     * add buttons and labels
     */
    
    [self.navigationController.navigationBar pushNavigationItem:myNavItem animated:NO];
    

提交回复
热议问题