Siarhei Fedartsou
Siarhei Fedartsou

Reputation: 1873

Emoji changes my keyboard to its...

I have some problem. On start of my application I automatically show number pad keyboard(I send becomeFirstResponder to one of textfields) . But if user has used emoji keyboard before my application, emoji keyboard is shown. How can I avoid it? I want to show exactly number pad, but not emoji keyboard.

Upvotes: 1

Views: 630

Answers (1)

sElanthiraiyan
sElanthiraiyan

Reputation: 6268

Use the keyboard notification and track the keyboard by using some BOOL variables,

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWasShown:) name:UIKeyboardDidShowNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWasHidden:) name:UIKeyboardDidHideNotification object:nil];

Check if a keyboard is already there by using the BOOL var. If its there resign it and show your keyboard.

Upvotes: 2

Related Questions