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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:26:44+00:00 2026-05-22T20:26:44+00:00

I want to show next previous buttons above the keyboard. I call function makeToolBars

  • 0

I want to show next previous buttons above the keyboard. I call function “makeToolBars” from viewDidLoad to create it. The application does display the buttons correctly but when I click on them I get error it does not go to “goToNextField” function.

Can anyone point how to correct it ?

-(void)goToNextField:(id)sender
{
    [txtPassword resignFirstResponder];
    [txtUserName becomeFirstResponder];
}

-(void) makeToolBars
{
    UIToolbar *toolbar1 = [[[UIToolbar alloc] init] autorelease];
    [toolbar1 setBarStyle:UIBarStyleBlackTranslucent];
    [toolbar1 sizeToFit];

    UIBarButtonItem *nextButton = [[UIBarButtonItem alloc]
                                   initWithTitle:@"Next"
                                   style:UIBarButtonItemStyleBordered
                                   target:self
                                   action:@selector(goToNextField)];

    UIBarButtonItem *flexButton1 = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:self action:nil];

    NSArray *itemsArray1 = [NSArray arrayWithObjects: nextButton,flexButton1, nil];

    [flexButton1 release];
    [nextButton release];
    [toolbar1 setItems:itemsArray1];

    [txtUserName setInputAccessoryView:toolbar1];


}
  • 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-22T20:26:45+00:00Added an answer on May 22, 2026 at 8:26 pm

    The below statement is wrong.

    UIBarButtonItem *nextButton = [[UIBarButtonItem alloc]
                                   initWithTitle:@"Next"
                                   style:UIBarButtonItemStyleBordered
                                   target:self
                                   action:@selector(goToNextField)];
    

    use the below modified correct code .

    UIBarButtonItem *nextButton = [[UIBarButtonItem alloc]
                                       initWithTitle:@"Next"
                                       style:UIBarButtonItemStyleBordered
                                       target:self
                                       action:@selector(goToNextField:)];
    

    Because you might forget to append colon in goToNextField (Correct goToNextField:).

    And in your function implementation for goToNextField you were considering the colon and put :(id) sender in your function.

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

Sidebar

Related Questions

I want to show the virtual keyboard with Prev, Next Buttons above the keyboard.
I want to show dots for next and previous and for go to specific
I am building a wordpress theme I want to have the next and previous
I have created a jquery slider. On clicking next or back buttons .animate function
hii I want show a pop up Dialog box when i click on to
I want to show HTML content inside Flash. Is there some way to do
I want to show a chromeless modal window with a close button in the
I want to show the publish date in the About dialog.
...I want to Show the 'delete' button when user is an admin, and show
We want to show a hint for a JList that the user can select

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.