If you need to develop a third-party keyboard first you need to know Apple official documentation https://developer.apple.com/library/ios/documentation/General/Conceptual/ Extensibilitypg/keyboard.html
Then suggest a look at appextension
Http://www.cocoachina.com/ios/20140918/9677.html
The keyboard app belongs to your hostapp so if you want to understand appgroups to do two inter-application information transfer
How to use
Nsuserdefaults *keyboarddefaults = [[Nsuserdefaults alloc] initwithsuitename:appgroups];
Appgroups is the field we set is the same as the field where the AppGroup is added
Xcode will give us a class for generating keyboard in this class we can do third-party keyboards
1. It is recommended to use AutoLayout as a constraint in this class
2.
CGFloat _expandedheight = 256;
Nslayoutconstraint *_heightconstraint = [Nslayoutconstraint constraintWithItem:self.view attribute: Nslayoutattributeheight relatedby:nslayoutrelationequal Toitem:nil Attribute:nslayoutattributenotanattribute MULTIPLIER:0 constant: _expandedheight];
[Self.view addconstraint: _heightconstraint];
This method can set the keyboard height
The problem I encountered: Invalid call in Updatecontraint
3. Enter text: Call the Protocol method Textdocumentproxy.
-(BOOL) HasText;
-(void) InsertText: (NSString *) text; Enter text
-(void) deletebackward;//Delete text
Our keyboard must have a button for the next input method to refer to the native earth button if it is to be audited.
Call
-(void) Advancetonextinputmode
This method can be done
Apple's open APIs are a good choice for you to look at your documents.
4 also encountered a problem: temporarily unable to jump from their keyboard side to Mainapp
Previous use of WebView is possible, but the recommendation on StackOverflow is disabled after Apple updates
I hope someone who solves this problem can tell me.
5 Our Organization QQ group No. 248458280 period to everyone's visit together to learn to grow together
IOS thirdkeyboard Develop (APP Extension)