그것을 제거 ... 난 일반 키보드에서 해당 버튼을 제거하는 방법 나를 인도 당신이 300
//for remove done button from keyboard
- (void)removeButtonFromKeyboard
{
// locate keyboard view
UIWindow* tempWindow = [[[UIApplication sharedApplication] windows] objectAtIndex:1];
UIView* keyboard;
for(int i=0; i<[tempWindow.subviews count]; i++)
{
keyboard = [tempWindow.subviews objectAtIndex:i];
// keyboard found, remove the button
if([[keyboard description] hasPrefix:@"<UIPeripheralHost"] == YES)
{
[[keyboard viewWithTag:300] removeFromSuperview];
}
else
{
if([[keyboard description] hasPrefix:@"<UIKeyboard"] == YES)
[[keyboard viewWithTag:300] removeFromSuperview];
}
}
isButtonAdded = NO ;
}
을 button.Here하는
tag
을 할당해야 당신이 완료 버튼을 원하는 여부 텍스트 제기의 태그를 통해 것을
편집 - (BOOL)textFieldShouldBeginEditing:(UITextField *)textField
확인할 수 있습니다에서
. 좋아요 :
- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField
{
if (textField.tag == 1001)
{
// add button
// take a Boolean and make it true in your create button function
if(!doneButtonAdded)// if button is not added
{
// then add button
}
}
else if (textFiled.tag == 1002) // your normal key board
{
if(doneButtonAdded)// if button is added
{
// remove button
// in remove button function make doneButtonAdded to false
}
}
}
희망이 있습니다.
마침내 그 작업이 라인은 내가 [removeObserver [NSNotificationCenter defaultCenter] : 자기] 찾고 있어요; 너무 많이 예고 해줘서 고마워. –