Reputation: 6133
In new iOS 8 custom keyboard extension, we can go to next keyboard by this code.
[self advanceToNextInputMode];
How can I dismiss custom keyboard? (not hide, not go to next keyboard). Thanks for your help. :)
Upvotes: 2
Views: 1113
Reputation: 6175
Use the code below,
Objective-C:
[[UIApplication sharedApplication] sendAction:@selector(resignFirstResponder) to:nil from:nil forEvent:nil];
Swift:
UIApplication.sharedApplication().sendAction("resignFirstResponder", to:nil, from:nil, forEvent:nil)
Upvotes: 0