title: How to show “Done” button on iPhone number pad in ios 9
body: <pre><code>- (void)keyboardWillShow:(NSNotification *)note {
      // create custom button
      UIButton *doneButton = [UIButton buttonWithType:UIButtonTypeCustom];
      doneButton.frame = CGRectMake(0, 163, 106, 53);
      doneButton.adjustsImageWhenHighlighted = NO;
      //[doneButton setImage:[UIImage imageNamed:@"doneButtonNormal.png"] forState:UIControlStateNormal];
      //[doneButton setImage:[UIImage imageNamed:@"doneButtonPressed.png"] forState:UIControlStateHighlighted];
      [doneButton setTitle:@"完成" forState:UIControlStateNormal];
      [doneButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
      [doneButton addTarget:self action:@selector(doneButton:) forControlEvents:UIControlEventTouchUpInside];
  
  
      UIView *foundKeyboard = nil;
      UIWindow *keyboardWindow = nil;
  
  
      keyboardWindow = [[[UIApplication sharedApplication] windows] lastObject] ;
      keyboardWindow.userInteractionEnabled = YES;
      if (!keyboardWindow) return;
  
      for (__strong UIView *possibleKeyboard in [keyboardWindow subviews]) {
  
          if ([[possibleKeyboard description] hasPrefix:@"&lt;UIInputSetContainerView"]) {
              for (__strong UIView *possibleKeyboard_2 in possibleKeyboard.subviews) {
                  if ([possibleKeyboard_2.description hasPrefix:@"&lt;UIInputSetHostView"]) {
                      foundKeyboard = possibleKeyboard_2;
                  }
              }
          }
      }
  
  
      if (foundKeyboard) {
          if ([[foundKeyboard subviews] indexOfObject:doneButton] == NSNotFound) {
              [foundKeyboard addSubview:doneButton];
          } else {
              [foundKeyboard bringSubviewToFront:doneButton];
          }
  
      }
  
  }
  </code></pre>