Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1003305
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T07:57:37+00:00 2026-05-16T07:57:37+00:00

I’m making a custom input method for the iPad, I want to be able

  • 0

I’m making a custom input method for the iPad, I want to be able to replace the system keyboard with my input method and enter text via that input method.

According to the documentation all I need to do is to set the inputView property with my view and it will be used instead of the system keyboard. I did that and it works, as far as showing the keyboard but how do I actually enter text into the text view?

Supposedly the text view needs to adopt the UIKeyInput and I can use the protocol’s methods to enter the text but in reality UITextView doesn’t adopt this protocol. conformsToProtocol:@protocol(UIKeyInput) returns NO and “deleteBackwards” is not implemented (insertText and hasText are implemented. In addition to that, “insertText” doesn’t cause the textViewDidChange: delegate method to be invoked. Obviously I need to send the UIKeyInput method to some other object (a field editor?) but how do I get it?

Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T07:57:38+00:00Added an answer on May 16, 2026 at 7:57 am

    Assuming your keyboard has some buttons, why cant you just set a selector for your keys, and append to the textViews text when each button is clicked, I have done this an it works fine…Here is the method that actually does the “writing” to the UITextView, this method is part of a custom protocol defined by the inputView and is called on the delegate whenever a button is pressed, hope it helps, note: i submit ret when the return key is pushed and <- when backspace is pushed.

    -(void)userDidInputString:(NSString*)s
    {
        NSRange r=padView.textView.selectedRange; 
        if([s isEqualToString:@"ret"])
            s=@"\n";
        if([s isEqualToString:@"<-"])
        {
            NSString *text=padView.textView.text;   
            if(r.location>0)
            {
                r.location=r.location-1;
                r.length+=1;
            }
                    [padView.textView setScrollEnabled:YES];
            padView.textView.text=[text stringByReplacingCharactersInRange:r   withString:@""];
            [padView.textView setScrollEnabled:NO];
            r.length=0;
            [padView.textView setSelectedRange:r];
            [note setNoteText:padView.textView.text];
    
        }
        else {
            NSString *text=padView.textView.text;   
    
            [padView.textView setScrollEnabled:YES];
            padView.textView.text=[text stringByReplacingCharactersInRange:r withString:s];
                    [padView.textView setScrollEnabled:NO];
            r.location=r.location+[s length];
            //whenever you modify the text by setting the UITextViews text property it resets the cursor to the end of the text view, we have this line below to go back to where the user left off
            [padView.textView setSelectedRange:r];
    
    
                }
    
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.