UIActionSheet取消按钮不解除动作表 [英] UIActionSheet cancel button not dismissing actionsheet

查看:122
本文介绍了UIActionSheet取消按钮不解除动作表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个UIActionSheet并且我指定了取消按钮,但是当它被点击时它不会被忽略?

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];

根据文档,我不需要任何代码,即使我尝试实现didCancel委托从未调用过的方法?

According to the documentation I don't need any code and even when I try and implement the didCancel delegate method its never called?

推荐答案

您需要在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.

这篇关于UIActionSheet取消按钮不解除动作表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆