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 3848426
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T16:41:59+00:00 2026-05-19T16:41:59+00:00

i need to add button done on keypad. Apple does n’t provide such felicity

  • 0

i need to add button done on keypad.

Apple does n’t provide such felicity but some of application i found that done ,next,previous buttons.

like this.

how can i add these and how can i give click event to them.

can any one please help me.

  • 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-19T16:42:00+00:00Added an answer on May 19, 2026 at 4:42 pm

    1.Define the done button (= return key):

    textField.returnKeyType = UIReturnKeyDone;
    

    2.Add the action-listener:

    [textField addTarget:self action:@selector(textFieldDoneEditing:) forControlEvents:UIControlEventEditingDidEndOnExit];
    

    3.Define the action-event:

    - (IBAction)textFieldDoneEditing:(id)sender {
        [sender resignFirstResponder];
    }
    

    Have fun!

    EDIT:

    Here you can find detailed instructions how to add a Toolbar with Next & Previous above UITextField Keyboard:
    http://www.randomsequence.com/articles/adding-a-toolbar-with-next-previous-above-uitextfield-keyboard-iphone/

    EDIT2:

    Now, I have a really great example for you: “This view extends UITextView adding on top of the keyboard associated with this UITextView a toolbar with a « Done » Button”

    I check the code and it is a lot of easier than the first example:

    http://blog.demay-fr.net/2009/07/cocoa-how-to-add-a-toolbar-with-button-on-top-of-a-uitextview-in-order-to-add-a-dismiss-button/

    EDIT3:

    Hmmm, no, I doesn’t test to code. But I will test it now!

    1.Problem: the right initialization. If I add the UITextView in IB, initWithCoder gets called:

    - (id)init {
    
        NSLog(@"init");
    
        if (self = [super init]) {
            //register a specific method on keyboard appearence
            [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:nil];
        }
        return self;
    }
    
    - (id)initWithCoder:(NSCoder *)decoder {
    
        NSLog(@"initWithCoder");
    
        if (self = [super initWithCoder:decoder]) {
            //register a specific method on keyboard appearence
            [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:nil];
        }
        return self;
    }
    
    - (id)initWithFrame:(CGRect)frame {
    
        NSLog(@"initWithFrame");
    
        if (self = [super initWithFrame:frame]) {
            //register a specific method on keyboard appearence
            [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:nil];
        }
        return self;
    } 
    

    2.Problem: There’s no view with the the Prefix “UIKeyboard”:

    for (UIWindow *keyboardWindow in [[UIApplication sharedApplication] windows]) {
        NSLog(@"keyboardWindow = %@", keyboardWindow);
        for (UIView *keyboard in [keyboardWindow subviews]) {
            NSLog(@"keyboard = %@", keyboard);
    
                if([[keyboard description] hasPrefix:@"<UIKeyboard"] == YES) {
                    // THERE'S NO VIEW 'UIKeyboard'!!!
                }
    
        }
    }
    

    The code doesn’t work, I’m sorry… I don’t know why there’s no view “UIKeyboard”… Maybe the first example will help you at this point and you can build your own solution.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I found this code to display a modal view: - (void)add:(id)sender { // Create
I am attempting to add items to an application bar with behavoirs. In xaml
On C# winforms project, I have a small table, a filter box, an Add
Need suggestions on implementing associating single or many objects to an entity. All soccer
I want to build a form where users can enter some data in a
I am developing an iPhone application which requires a multiline text field (UITextView) to
I would like to add a UIBarButton of style UIBarButtonSystemItemDone to a UIView, instead
I have two textfields and two buttons and the button should not be visible
I am writing an application that will check text entered into a rich text
first let me start by saying I'm pretty new to iPhone, so I apologise

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.