如何在分段控制器上添加下一个和上一个按钮? [英] How can i add a next and previous button at the segmented Controller?

查看:23
本文介绍了如何在分段控制器上添加下一个和上一个按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用程序中,我在导航栏中有一个分段控制器,到目前为止我有 6 个按钮.

In my application I have a segmented controller at navigation bar and until now I have 6 buttons there.

但是现在我想在分段控制器上添加更多带有这 6 个按钮的 5 个按钮,但问题是我想在分段控制器上添加上一个和下一个按钮以查看分段控制器的上一个按钮和下一个按钮.

But now I want to add more 5 buttons with these 6 buttons at segmented controller but problem is I want to add an previous and next button at segmented controller to see previous buttons and next buttons of the segmented controller.

注意:我知道如何在导航栏中设置分段控制器.到目前为止,我已经能够在导航栏设置分段控制器.

NOTE THAT: I know how can set an segmented controller at navigation bar. Until now, I have become able to set segmented controller at navigation bar.

如果我再解释一下,它应该是这样的:

If I explain again then it should be look like this:

<代码><上一页 |一个 |乙 |C |D |E |下一个 >
当我按下 next 时,它会显示如下:
<代码><以前 |乙 |C |D |E |F |下一个 >
像这样上一个按钮.

< Previous | A | B | C | D | E | next >
when I will press next then it will show like this:
< previous | B | C | D | E | F | next >
like this for previous button.

谁来帮帮我.我该怎么做?

Anybody help me. How can I do this?

推荐答案

就用户体验而言,分段控件并非设计用于这种方式.

In terms of user experience, segmented controls are not designed to be used this way.

如果你真的想要,你可以强制它,通过在选择第一个或最后一个段时修改适当段上的文本,然后清除选择,但用户已经习惯了分段控件的工作方式,并且这可能会令人困惑(更不用说它可能无法通过 Apple 的审核流程).

You could force it if you really wanted to, by modifying the text on the appropriate segments when either the first or last segment was selected and then clearing the selection, but users are accustomed to how segmented controls are supposed to work, and this could be confusing (not to mention it may fail Apple's review process).

这篇关于如何在分段控制器上添加下一个和上一个按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆