导航控制器上的编辑按钮
我的应用程序中有一个导航控制器,在其根视图控制器上有一个编辑按钮作为 rightBarButtonItem。
我有第二个表视图,当在根视图控制器上点击单元格时会推送该表视图。
leftBarButtonItem 成为后退按钮。
我也想要一个编辑按钮,我应该把它放在哪里才最有意义?我的 rightBarButtonItem 是一个 + 按钮,因此排除了这种情况。
我希望能够点击单元格并更改单元格文本。
谢谢
I have a navigation controller in my app and on its root view controller i have an Edit button as the rightBarButtonItem.
I have a second table view which is pushed when a cell is tapped on the root view controller.
The leftBarButtonItem becomes the Back button.
I would like an Edit button as well, where can i put it that would make the most sense? My rightBarButtonItem is a + button, so that rules that out.
I would like to be able to tap a cell and change the cells text.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最简单的方法是在底部添加一个包含编辑按钮的工具栏。
您还可以尝试使用包含两个 UIButton 的自定义视图添加一个栏按钮项目,并将其设置为视图控制器导航项目的右侧栏按钮项目。我还没有实际尝试过,所以我真的不知道它是否有效或效果如何。
The easiest thing to do is add a toolbar at the bottom that contains an edit button.
You could also try adding a bar button item with a custom view that contains two UIButtons and set it as the right bar button item of your view controller's navigation item. I haven't actually tried this, so I don't really know if or how well it would work.