title: UIKeyboardTypeNumberPad return or done button in iOS 5
body: <p>In iOS 3 this workaround involved creating a customer UIButton and adding this as a subview to the Apple keyboard. When iOS 4 was released the view that the subview was added to changed. So to get this working in iOS3 &amp; 4 I had the following.</p>
  
  <pre><code>-(void) addDoneButtonToNumericKeyboard {
  if(doneButtonIsAdded) {
      return;
  }
  if(doneButtonForNumericKeyboard == nil) {
      doneButtonForNumericKeyboard= [[UIButton buttonWithType:UIButtonTypeCustom] retain];
      doneButtonForNumericKeyboard.frame = CGRectMake(0, 163, 106, 53);
      doneButtonForNumericKeyboard.adjustsImageWhenHighlighted = NO;
      if ([[[UIDevice currentDevice] systemVersion] hasPrefix:@"3"]) {
          [doneButtonForNumericKeyboard setImage:[UIImage imageNamed:@"DoneUp3.png"] forState:UIControlStateNormal];
          [doneButtonForNumericKeyboard setImage:[UIImage imageNamed:@"DoneDown3.png"] forState:UIControlStateHighlighted];
      } else {        
          [doneButtonForNumericKeyboard setImage:[UIImage imageNamed:@"DoneUp.png"] forState:UIControlStateNormal];
          [doneButtonForNumericKeyboard setImage:[UIImage imageNamed:@"DoneDown.png"] forState:UIControlStateHighlighted];
      }
      [doneButtonForNumericKeyboard addTarget:self action:@selector(doneButton:) forControlEvents:UIControlEventTouchUpInside];
  }
  // locate keyboard view
  NSArray *winArray = [[UIApplication sharedApplication] windows];
  if(winArray == nil || [winArray count] &lt; 2) {
      NSLog(@"No winArray found!");
      return;
  }
  UIWindow* tempWindow = [[[UIApplication sharedApplication] windows] objectAtIndex:1];
  UIView* keyboard;
  for(int i=0; i&lt;[tempWindow.subviews count]; i++) {
      keyboard = [tempWindow.subviews objectAtIndex:i];
      // keyboard view found; add the custom button to it
      NSLog(@"Keyboard description : %@", [keyboard description]);
      if([[keyboard description] hasPrefix:@"&lt;UIKeyboard"] == YES || [[keyboard description] hasPrefix:@"&lt;UIPeripheralHost"] == YES) {
          NSLog(@"Attaching done button");
          [keyboard addSubview:doneButtonForNumericKeyboard];
          doneButtonIsAdded = YES;
      }
  }
  }
  </code></pre>
  
  <p>Anyone have any ideas how to get this working for iOS 5?</p>
  
  <p>Neither of the methods above work for 5. There is an attempt to add the subview that seems to be successful but nothing is displayed. The area is just blank on screen and does not respond to a touch.</p>