解决方案 »

  1.   

    'textFieldIndex (0) is outside of the bounds of the array of text fields
    很明显这个错误和alertview没有任何关系,是你数组越界的问题
      

  2.   

    可是我把
    UIAlertView *alert = [[UIAlertView alloc]
                              initWithTitle:@"提示" message:@"预约信息已提交!" delegate:self cancelButtonTitle:@"确定" otherButtonTitles:nil, nil];
    中的delegate:self改为delegate:nil后,再次运行便不会报错,这又作何解释呢?
      

  3.   

    这是因为你没设置delegate,自然不会调到didDismissWithButtonIndex这个方法里面去
      

  4.   

    这个错误应该和你其他地方的代码也有关系,另外alert自己有tag属性,不用你额外维护一个alertFlag
      

  5.   

    buttonIndex 是整形啊,你buttonIndex==0
      

  6.   

    这个问题我也遇到了,我的原因是我设置了多个alert,其中有一个alert的类型是输入型的警示框,我把它改成了普通警示框类型就不报错了