UIToolBar - 如何处理按钮溢出?
我有一个带有工具栏的视图 - 工具栏上的每个按钮代表用户正在撰写的一条新消息。 我花了几个工作日才弄清楚如何处理视图切换等。但现在我已经弄清楚了这一切,我遇到了一些 UI 混乱。
当我有超过 11 个按钮时(我知道,用户应该在创建第 11 个按钮之前发送前 10 个按钮,但我试图做到彻底),按钮就会超出屏幕的末端。 没有任何指示器(除了您可以看到的半按钮之外)表明可以按下其他按钮。
有没有人遇到过这样的情况,你是如何处理的?
我最初的想法是,当按钮数量超过(比方说)8 个时,我会以编程方式将第一个和最后一个按钮设置为“<” 和“>” 通过在我的[工具栏项目]中删除和添加按钮,可以向下滑动按钮。
有什么想法吗?
I have a view with a toolbar - each button on the toolbar represents a new message the user is composing. It took me several work days to figure out how to handle the view switching, etc.. but now that I have that all figured out, I have run into a bit of a UI-snafu.
When I have over 11 buttons (I know, a user should really SEND the first 10 before creating an 11th, but I am trying to be thorough) the buttons run off the end of the screen. There is no indicator (aside from the half-button you can see), that there are additional button(s) that can be pressed.
Has anyone run into a situation like this before, and how have you handled it?
My initial thought is when there are more than (lets say) 8 buttons, I programmatically make the first and last buttons "<" and ">" buttons that will slide the buttons down, by removing and adding buttons to my [toolbar items].
Any thoughts?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
与其为 iPhone 创建一种新的 UI 类型(Apple 可能接受也可能不接受),最好的方法可能是告诉用户他/她已经达到了限制,并且必须先发送一条消息才能创建一个新的。 就像您尝试打开第 10 个网页时 Safari 所做的那样。
Instead of creating a new type of UI for the iPhone (which Apple may or may not accept) it would probably be best if you just told the user that he/she has reached the limit and will have to send a message before they can create a new one. Like Safari does when you try to open a 10th webpage.
我认为凯恩可能是正确的,但你想要做的事情听起来很像可滚动的选项卡栏。 Three20 提供了一个处理此问题的类,或者您可以自己实现它。 操作系统中没有对此进行规定(我认为如果你说你试图在其中放置 10 个按钮,那么 UI 人员可能会强烈反对,更不用说超过 10 个了。)
I think Kane is probably correct, but what you're trying to do sounds a lot like a scrollable tab bar. Three20 offers a class that handles this, or you could implement it yourself. There's no provision for this in the OS (I think the UI guys would probably strongly object if you said you were trying to put 10 buttons down there, let alone MORE than 10.)