将框架设置为 UIActionSheet
我正在开发 iPad 应用程序。我已经使用了电子邮件和打印功能。为了显示这些选项,我使用了 UIActionSheet。但是UIActionSheet的大小太大了。我可以为 UIActionSheet 设置框架以减小其大小吗?
I am working on an iPad application. I have used email and print functionality into it. To show these options I have used UIActionSheet. But the size of UIActionSheet is too large. Can I set frames to UIActionSheet to reduce its size?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您至少可以更改操作表的
边界
,尤其是高度值。这甚至可以在调用showFromToolbar:
等之后完成。请注意,这不会重新定位按钮,而似乎只是在操作表底部添加/删除空间。在更改布局之前,必须问自己这是否真的有必要,或者是否可能有任何其他选项,但我见过有必要这样做的情况(例如 UIActionSheet 中的 UIDatePicker)。
You can at least change the
bounds
of the action sheet, especially the height value. This can at even be done right after the call toshowFromToolbar:
etc. Note that this does not reposition the buttons but only seems to add/remove space from the bottom of the action sheet.Before changing the layout one has to ask themselves if this is really necessary or if there might be any other option, but I've seen cases where this is necessary (e.g. an UIDatePicker within an UIActionSheet).