我有一个 textView & on TextViewDidEndEditing
,我显示一个带有两个按钮保存的警报?是的 没有。
我也有图像按钮,当它被单击时我resignFirstResponder
为 textview,所以警报将被显示并且还显示操作表。
但是操作表按钮不可点击并且应用程序挂起。什么都没有发生......
我的代码如下:
-(void)textViewDidEndEditing:(UITextView *)textView
{
UIAlertView *alt=[[UIAlertView alloc]initWithTitle:@"" message:@"Do you want to save this note?" delegate:self cancelButtonTitle:@"No" otherButtonTitles:@"Yes", nil];
[alt setTag:1];
[alt show];
}
-(IBAction)image_button:(id)sender
{
[MYTextView resignFirstResponder];
UIActionSheet *ac=[[UIActionSheet alloc]initWithTitle:@"Select the Option" delegate:self cancelButtonTitle:nil destructiveButtonTitle:nil otherButtonTitles:@"Photo Library",@"Camera Capture", nil];
ac.tag=4;
ac.delegate = self;
ac.backgroundColor=[UIColor blackColor];
[ac showInView:self.view];
}