Can you add buttons to navigation bars through storyboard?

前端 未结 2 1823
走了就别回头了
走了就别回头了 2020-12-13 01:45

At the moment, I\'ve been adding navigation buttons like follows:

self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@\"Add\"
           


        
2条回答
  •  情歌与酒
    2020-12-13 02:22

    You can just drag out a Bar Button Item and drop it on the right end of the view controller's navigation bar:

    enter image description here

提交回复
热议问题