I've created a version to enable the horizontal version of the numpad...
plug into the technique described in Luzian Scherrer's blog and add the two extra pngs (not included here), and the "isLandscape" boolean into "didRotateFromInterfaceOrientation" method..
@interface AlarmController ()
{
CGRect doneButtnRectVert;
CGRect doneButtnRectHorz;
CGRect doneButtnRect;
UIImage* DoneUpVert;
UIImage* DoneDownVert;
UIImage* DoneUpHorz;
UIImage* DoneDownHorz;
UIImage* DoneUp;
UIImage* DoneDown;
UIButton *oldDoneButton;
}
@end
//---------------------------------------------------------------------------
- (void)viewDidUnload
{
NSLog(@"viewDidUnload AlarmController");
[[NSNotificationCenter defaultCenter] removeObserver:self
name:UIKeyboardDidShowNotification object:nil];
[super viewDidUnload];
}
//---------------------------------------------------------------------------
- (void)addButtonToKeyboard
{
NSLog(@"addButtonToKeyboard AlarmController");
if (isLandscape)
{
doneButtnRect = doneButtnRectHorz;
DoneUp = DoneUpHorz;
DoneDown = DoneDownHorz;
} else {
doneButtnRect = doneButtnRectVert;
DoneUp = DoneUpVert;
DoneDown = DoneDownVert;
}
UIButton *doneButton = [UIButton buttonWithType:UIButtonTypeCustom];
doneButton.frame = doneButtnRect;
doneButton.adjustsImageWhenHighlighted = NO;
[doneButton setImage:DoneUp forState:UIControlStateNormal];
[doneButton setImage:DoneDown forState:UIControlStateHighlighted];
[doneButton addTarget:self action:@selector(done:) forControlEvents:UIControlEventTouchUpInside];
UIWindow* tempWindow = [[[UIApplication sharedApplication] windows] objectAtIndex:1];
UIView* keyboard;
for(int i=0; i<[tempWindow.subviews count]; i++)
{
keyboard = [tempWindow.subviews objectAtIndex:i];
if([[keyboard description] hasPrefix:@"