IOS thirdkeyboard Develop (APP Extension)

Source: Internet
Author: User

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)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.