Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Custom iPad keyboard that looks like the system keyboards

I'm looking for a non-hackish solution for this, so basically -inputView. The part that I'm not sure about is how to make it look like the regular keyboards, from the background to the keys. I realize that I could photoshop an apple keyboard, but this seems like it is a little hackish, especially if apple (probably not but still possible) decides to change the look of their keyboards. I know Numbers has done an excellent job of making extra keyboards that look like the standard system ones, and I would like to do it like those (although obviously they have access to the same resources that made the system keyboards, including possible private frameworks, etc.)

like image 555
Jared Pochtar Avatar asked Aug 04 '10 13:08

Jared Pochtar


People also ask

Can you customize your keyboard on iPad?

Go to Settings > General > Keyboard. Tap Keyboards, then do any of the following: Add a keyboard: Tap Add New Keyboard, then choose a keyboard from the list.

Can you make your own keyboard on iOS?

With iOS 8, Apple has made it possible to create custom keyboards that will be able to be used system wide in other apps. You can now ship a custom keyboard with your app and users will be able to choose it as the keyboard to use for every app that requires text input.

Can iPad use third-party keyboard?

You can now use your new third-party keyboard and enjoy all of the features that you can't access in the default keyboard on your iPhone and iPad. Speaking of the default keyboard on the iPhone, it does have one advantage over third-party keyboards.


1 Answers

I used the following:

tenDigitKeyboard.m

-(IBAction)pressedKey:(UIButton *)sender
{
    [delegate pressedKey:sender.tag];
}

where delegate is defined as `id delegate;

then in the delegate i do...

-(void)pressedKey:(NSInteger)key
{
    NSString * bufferString = model.string;
    if (key == -1) {//delete
        model.string = [bufferString substringWithRange:NSMakeRange(0, [bufferString length]-1)];
    }else{
     //will need to change the following to lookup key value based on a lookup of the button.tag
        model.string = [bufferString stringByAppendingFormat:@"%i",key];
    }
    [self update];//updates the view
}

I got the keyboard button artwork from: http://www.teehanlax.com/blog/iphone-gui-psd-v4/

like image 109
Grady Player Avatar answered Nov 06 '22 21:11

Grady Player