uiactionsheet 点击在操作表底部不起作用的非常奇怪的错误
我有一个 uiactionsheet,按钮在我第一次按下或第二次按下时无法正常工作,但在尝试后只有多次。我尝试删除底部的取消按钮并保留按钮标题,但这些步骤都没有解决问题。 这是我正在使用的代码:
UIActionSheet *aSheet = [[UIActionSheet alloc]
initWithTitle:nil
delegate:self
cancelButtonTitle:nil
destructiveButtonTitle: @"Close"
otherButtonTitles:@"6940313388", @"2", @"3", @"4", nil];
i have a uiactionsheet and the buttom button doesnt work correctly the first time i press it, or the second, but only numerous times after trying. I tried removing the cancel button at the bottom and leaving a button title however none of these steps solved the problem.
This is the code i am using:
UIActionSheet *aSheet = [[UIActionSheet alloc]
initWithTitle:nil
delegate:self
cancelButtonTitle:nil
destructiveButtonTitle: @"Close"
otherButtonTitles:@"6940313388", @"2", @"3", @"4", nil];
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我发现,如果您从错误的视图显示操作表,则视图中可能存在的任何底部栏都会阻止操作表的用户交互,但不会在视觉上掩盖它。
尝试调用
showFromToolbar:
、showFromTabBar:
和showInView:
看看哪个可以正常工作(我现在不记得了)。I've found that if you present the action sheet from the wrong view, whatever bottom bar may exist in your view will block the user interaction of the action sheet but not visually obscure it.
Experiment with calling
showFromToolbar:
,showFromTabBar:
andshowInView:
to see which works properly (I can't remember at the moment).我用...
I use...