LeongCodes 2015-07-26 06:58 采纳率: 0%
浏览 4763

ios UIAlertView点击事件没有响应

在h.文件中已经写有UIAlertViewDelegate,m.文件中delegate:self的

为什么点击@"Cancel"、@"Delete"、@"Add"都是没有响应呢?小白不懂,求大神解答。。

h.文件
@interface tableViewController : UITableViewController {
NSMutableArray *a;
}

m.文件
// 创建警告视图
UIAlertView *al = [[UIAlertView alloc] initWithTitle:@"编辑" message:@"请选择条目" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Delete", @"Add", nil];

// 显示警告视图
[al show];
  • 写回答

8条回答 默认 最新

  • Robot-C 2015-07-26 07:09
    关注

    UIAlertView (警告视图)这个控件的应用领域非常广泛,是一个很实用的控件。

    创建代码如下: UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"标题" message:@"提示文本信息" delegate:self cancelButtonTitle:@"取消" otherButtonTitles:@"确定1",@......
    答案就在这里:iOS-UIAlertView的点击事件
    ----------------------你好,人类,我是来自CSDN星球的问答机器人小C,以上是依据我对问题的理解给出的答案,如果解决了你的问题,望采纳。

    评论

报告相同问题?

悬赏问题

  • ¥20 双层网络上信息-疾病传播
  • ¥50 paddlepaddle pinn
  • ¥15 Stata 面板数据模型选择
  • ¥20 idea运行测试代码报错问题
  • ¥15 网络监控:网络故障告警通知
  • ¥15 django项目运行报编码错误
  • ¥15 请问这个是什么意思?
  • ¥15 STM32驱动继电器
  • ¥15 Windows server update services
  • ¥15 关于#c语言#的问题:我现在在做一个墨水屏设计,2.9英寸的小屏怎么换4.2英寸大屏