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

  • SEARCH
  • Home
  • 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 6103525
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:44:20+00:00 2026-05-23T13:44:20+00:00

I do not want an external keyboard to be allowed in my app. I

  • 0

I do not want an external keyboard to be allowed in my app. I realize this is an edge case but I do not like how the keyboard will not be shown when an external keyboard is used. Especially because I have a custom view above the keyboard that will now be shown at the bottom of the screen. Also, I have textfields that should only require numbers (phonenumber for example). Instead of checking input, I would rather just show the numbers keyboard. Obviously this can’t happen with external keyboard.

I saw a post here: How to detect external keyboard connectification in objective-c?

but that’s not enough to just detect it…I want to disable!

Thanks,

-Adam

  • 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-23T13:44:20+00:00Added an answer on May 23, 2026 at 1:44 pm

    Here are two things you can do to circumvent this problem:

    You can force the keyboard to appear even when there is an external keyboard present.

    You can validate text input using the UITextField delegate method

    - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string
    

    For example, to allow only numbers to be entered, you can do:

    - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {
    
        NSCharacterSet *myCharSet = [NSCharacterSet characterSetWithCharactersInString:@"0123456789"];
    
        if ([[string stringByTrimmingCharactersInSet:myCharSet] length]) {
            return YES;
        } else {
            return NO;
        }
    } 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We do not want to use exit(0) to make the app close, we do
I've a Glype proxy and I want not parse external URLs. All URLs on
The using below hits an external resource that I do not want to actually
I know this does not sound Pythonic, but bear with me for a second.
I have a question very similar to this one but the answer does not
I do not want to change the public static void ... String[] args part
I do not want my clients to select a parent page from the drop
I do not want to use .htaccess. How should I change my Directory attributes?
My client does not want to have ftp on the production box (understandable). We
The following code does not want to compile. See the included error message. Code:

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.