TextViewDidEndEditing
에 &의 텍스트 뷰가 있습니다. 두 개의 버튼이있는 경고를 표시합니까? 예 아니오iOS SDK의 알림보기 및 작업 시트로 인해 앱이 멈춤
나는 이미지 버튼을 클릭했을 때 텍스트 뷰로 i resignFirstResponder
을 입력 했으므로 경고 메시지가 표시됩니다. &에도 작업 시트가 표시됩니다.
하지만 액션 시트 버튼을 클릭 할 수 없습니다. & 앱이 멈췄습니다.
-(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];
}
처음에만 alertview을 시도하는 데 도움이 쇼와 후에 당신의 활동 시트를 엽니 다. –
alertview가 clickable = false에서 다른보기를 표시하는 경우. –
먼저 경고를 사용하고 ActionSheet를 사용하려고 시도하십시오. – Jitendra