UIAlert 视图中的非活动按钮
在我的 iPhone 应用程序中,我的导航栏中有一个“共享”按钮,会弹出一个带有“Twitter”和“Facebook”选项的 UIAlertView。当用户已经向 Twitter 发送了一些内容时,我不希望他能够再次发送该内容。
防止这种情况的一种方法是从该警报中删除 Twitter 按钮。这使得警报有点不一致/不可预测,我宁愿将 Twitter 按钮“灰显”。
有更好的方法吗?
In my iphone-app, I have a "Share" button in my Navigation bar, that pops up a UIAlertView with the options "Twitter" and "Facebook". When a user has already sent something to Twitter, I don't want him to be able to sent it again.
One way of preventing this, is to just remove the Twitter button from that Alert. This makes the Alert kind of inconsistent/unpredictable, and I would rather 'grey out' the Twitter button.
Is there a better way of doing this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据您正在做的事情,您应该使用 UIActionSheet。它遵循 HIG,然后您可以更好地控制 UX。
当您点击共享时,只需使用您希望用户选择的任何选项创建操作表即可。
Based on what you are doing, you should use an UIActionSheet. It follows the HIG and then you can control the UX a bit better.
When you tap share, just create the action sheet with whatever options you want to allow the user to select.