UIActionSheet 截断长字符串!替代品?
我有一个 UIActionSheet,它为用户提供了一些标准选择。然而,按钮上的文本并没有像文本字段那样巧妙地缩小,但当文本太多时,它只是用省略号截断。
我需要在操作表按钮上多说一点,但没有足够的空间。不幸的是,我没有看到任何改变操作表行为的方法。对替代方案有什么想法吗?
谢谢!
I have a UIActionSheet which gives the user a few standard choices. The text on the buttons, however, does not cleverly scale down like a text field though when there's too much-- it just truncates with an ellipsis.
I need to say a little more in on of my action sheet buttons than there's room for. I don't see any way of changing the action sheet's behavior, unfortunately. Any thoughts on alternatives?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以将一些描述性文本放入 UIActionSheet 的
title
属性中,然后在按钮标题中仅给出动词或简洁的内容。一种替代方法是:您可能想要创建一个用
presentModalViewController:animated:
显示的全屏视图,其中您有更多空间来显示文本。第三种选择是创建一个 UIView,它使用可以自定义的 UIButtons 进行动画处理,但不会填充整个屏幕。我在一些应用程序中这样做,其中“设置”位于向上滑动的选项卡中,但不需要覆盖整个屏幕。
You could put some of the descriptive text in the UIActionSheet's
title
property, and then give just the verb or something concise in the button titles.One alternative is: you might want to create a full-screen view that you show with
presentModalViewController:animated:
, where you have more space to show the text.A third alternative is to create a UIView that animates up with UIButtons that you can customize, but doesn't fill the entire screen. I do that with some of my apps where the Settings are in a tab that slides up but doesn't need to cover the entire screen.