导航控制器上的编辑按钮

发布于 2024-09-27 15:59:10 字数 252 浏览 1 评论 0原文

我的应用程序中有一个导航控制器,在其根视图控制器上有一个编辑按钮作为 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

聽兲甴掵 2024-10-04 15:59:10

最简单的方法是在底部添加一个包含编辑按钮的工具栏。

您还可以尝试使用包含两个 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文