I have seen many questions about iphone custom keyboard. But, I cannot find a good tutorial and the one that can be customized easily.
I have found out this which is easy to customise and also have popup text when user press the key. . https://github.com/kulpreetchilana/Custom-iOS-Keyboards
#define kChar_shift @[ @"ਔ", @"ਐ", @"ਆ", @"ਈ", @"ਊ", @"ਭ", @"ਙ", @"ਘ", @"ਧ", @"ਝ", @"ਢ", @"ਓ", @"ਏ", @"ਅ", @"ਇ", @"ਉ", @"ਫ", @"ੜ", @"ਖ", @"ਥ", @"ਛ", @"ਠ", @"◌ੰ", @"◌ੱ", @"ਣ", @"ਫ਼", @"ਜ਼", @"ਲ਼", @"ਸ਼", @"ਞ" ]
I want to implement keyboard for other language. That tutorial can do for other language but I cannot edit it to show original English keyboard. (Switched by button in inputAccessoryView).If possible, i would like to know how to do or where to edit in this.
In .h
@property (strong) id<UITextInput> textView;
In .m
-(void)setTextView:(id<UITextInput>)textView {
if ([textView isKindOfClass:[UITextView class]])
[(UITextView *)textView setInputView:self];
else if ([textView isKindOfClass:[UITextField class]])
[(UITextField *)textView setInputView:self];
_textView = textView;
}
-(id<UITextInput>)textView {
return _textView;
}
- (id)init
{
if (self)
{
NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"PMCustomKeyboard"
owner:self options:nil];
[[nib objectAtIndex:0] setFrame:frame];
self = [nib objectAtIndex:0];
}
}