UIActionSheet 取消按钮不关闭操作表
我有一个 UIActionSheet 并且指定了取消按钮,但是点击时它不会关闭?
UIActionSheet *actionSheet = [[[UIActionSheet alloc]initWithTitle:nil delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:@"Target Complete" otherButtonTitles:nil] autorelease];
[actionSheet showInView:self.view];
根据文档,我不需要任何代码,即使当我尝试实现 didCancel 委托方法时,它也从未被调用?
I have an UIActionSheet and I am specifying the cancel button however it does not dismiss when its tapped?
UIActionSheet *actionSheet = [[[UIActionSheet alloc]initWithTitle:nil delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:@"Target Complete" otherButtonTitles:nil] autorelease];
[actionSheet showInView:self.view];
According to the documentation I don't need any code and even when I try and implement the didCancel delegate method its never called?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
试试这个
UIActionSheet取消按钮奇怪的行为
Try this
UIActionSheet cancel button strange behaviour
这可以解决问题
而不是
This Will do the trick
instead of
使用
而不是
这个工作正常..:-)
use
instead of
this is working fine.. :-)
您需要从 iPhone 上的任务栏或工具栏进行显示,因为如果您使用在视图中显示,它会剪辑某些控件。
You need to display from a taskbar or a toolbar on iPhone as it clips some of the controls if you use display in view.
编写简单的代码,
效果很好
write simplite code
this work fine
我在这里找到了答案。
https://stackoverflow.com/a/1530259/1803218
I found the answer here.
https://stackoverflow.com/a/1530259/1803218