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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:21:03+00:00 2026-05-28T04:21:03+00:00

In my app, it causes problems if the ‘Next’ button (return key) is tapped

  • 0

In my app, it causes problems if the ‘Next’ button (return key) is tapped rapidly. Is there a way I can stop the user from doing this? I can’t think of a solution myself.

I am in a UIScrollView with many pages and on a certain page I have a keyboard popup so the user can type into a UITextField. Tapping the next button prompts the scroll view to slide to the next page. However, if the the user taps the button too much it causes the scroll view to jump about.

The code below is when the return key is tapped, the key part is it calls [self setPage:6];

-(BOOL)textFieldShouldReturn:(UITextField *)textField
{
    //Enter your first and last name
    if (textField == firstnameField1) 
    {
        //Put the text into a string to be saved
        firstName1 = firstnameField1.text;
        //Send user to next field (your surname)
        [surnameField1 becomeFirstResponder];
    }
    else if (textField == surnameField1)
    {
        //Put text into a string to be saved
        surname1 = surnameField1.text;
        //Move to the next stage, enter partners name
        if (pageController.currentPage == 4) {
            [self setPage:5];
        }
        else if (pageController.currentPage == 3)
        {
            [self setPage:5];
        }

        currentStage = stage6;
    }

    //Enter your partners first and last name
    if (textField == firstnameField2) 
    {
        //Put the text into a string to be saved
        firstName2 = firstnameField2.text;
        //Send user to next field (your partners surname)
        [surnameField2 becomeFirstResponder];
    }
    else if (textField == surnameField2)
    {
        //Put text into a string to be saved
        surname2 = surnameField2.text;
        //Move to the next stage, enter partners name
        if (pageController.currentPage == 5) {
            [self setPage:6];
        }
        else if (pageController.currentPage == 4)
        {
            [self setPage:6];
        }

        currentStage = stage7;
    }

    return YES;
}

That method setPage is below:

-(void)setPage:(int)destinationPage
{
    //Scroll to appropriate page in scroll view
    CGRect frame = scrollViewController.frame;
    frame.origin.x = frame.size.width * destinationPage;
    frame.origin.y = 0;
    [scrollViewController scrollRectToVisible:frame animated:YES];
}

Thanks.

  • 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-28T04:21:04+00:00Added an answer on May 28, 2026 at 4:21 am

    From your code, it looks like you’re overloading the Return button. Have you considered implementing a toolbar with Next/Previous buttons so that the user can easily return to a skipped field if they accidentally overtap?

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

Sidebar

Related Questions

Im having a problem with my app that causes it to crash when no
for some sick reason, my check productIDs[addIndex] = allProductIDs[lastProductFoundIndex + i]; causes my app
I've written a web app which after a while causes IE 8's memory usage
How can I programatically cause a control's tooltip to show in a Winforms app
I have an app that can make modify images. In some cases, this makes
This line is causing me some problems in an MVC app i'm developing <%=
I'm having a couple of problems with an alarm app I am developing. The
I think I have a solution to this, but is there a better way,
We need to make changes to an app that will cause all its URLS
App Engine only allows you to use these formats for XMPP addresses: app-id@appspot.com anything@app-id.appspotchat.com

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.