옵션 시트를 표시했을 때 키보드 숨기기에 문제가 있습니다.ios 앱에서 키보드 숨기기
내 코드의 문제는 어디에 있습니까?
- (void)optionsSheet2{
if(optionsSheet2) {
[optionsSheet2 dismissWithClickedButtonIndex:-1 animated:YES];
optionsSheet2 = nil;
}
optionsSheet2 = [[UIActionSheet alloc] initWithTitle:nil delegate:self cancelButtonTitle:NSLocalizedString(@"Cancel", nil) destructiveButtonTitle:nil otherButtonTitles:NSLocalizedString(@"Delete", nil), NSLocalizedString(@"Delete all", nil), nil];
[optionsSheet2 showInView:self.parentViewController.view];
}
- (void)dismissKeyboard {
[_uiSearchBar resignFirstResponder];
[_uiSearchBar setShowsCancelButton:NO animated:YES];
[_uiSearchBar setHidden:true];
[self.view endEditing:YES];
}
위임 방법을 올바르게 추가 했습니까? –
U 좀 더 명확 abt UR 질문 수 있습니까? – Kasaname
UIActionSheetDelegate 및 UISearchBarDelegate가 있습니다. – Unmerciful