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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:47:48+00:00 2026-05-26T22:47:48+00:00

I just created two functions, slideAuthViewUp and slideAuthViewDown that are called when you enter

  • 0

I just created two functions, slideAuthViewUp and slideAuthViewDown that are called when you enter the login or password UITextfield. It is useful in landscape mode to see the whole authentication form.

These are called like below:

[passwordTextField addTarget:self action:@selector(slideAuthFormUp) forControlEvents:UIControlEventEditingDidBegin];
[passwordTextField addTarget:self action:@selector(slideAuthFormDown) forControlEvents:UIControlEventEditingDidEnd];

[loginTextField addTarget:self action:@selector(slideAuthFormUp) forControlEvents:UIControlEventEditingDidBegin];
[loginTextField addTarget:self action:@selector(slideAuthFormDown) forControlEvents:UIControlEventEditingDidEnd];

Now, the problem is when I click on the password textfield the slideAuthFromDown is called by the login textfield and then the slideAuthFormUp is called by the password textfield. So the authentication form goes down and up in a really short time which is not what I want. I would like this form to stay up during this short time.

Does anybody know how to do that?

  • 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-26T22:47:49+00:00Added an answer on May 26, 2026 at 10:47 pm

    You need to perform the slide down after a short delay, and if a slide up happens within that time, cancel the scheduled selector. So…have an intermediary method…

    - (void)delayedSlideDown {
      [self performSelector:@selector(slideAuthFormDown) withObject:nil afterDelay:0.2];
    }
    

    Then use…

    [passwordTextField addTarget:self action:@selector(delayedSlideDown) forControlEvents:UIControlEventEditingDidEnd];
    

    And finally add the following line to slideAuthFormUp….

    [NSObject cancelPreviousPerformRequestsWithTarget:self];
    

    You may need to play with the 0.2 delay…

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

Sidebar

Related Questions

I just created two versions of a function that can be used to process
I just created a PHP page that spits outs some data from my database
I just created script that shows/hides (toggles) block of HTML. There are four buttons
I just created a javscript plugin that waits for all the images. The following
Let's say for example that I have two functions with random code inside and
I have two XML docs that I've created and I want to combine these
I have two functions: one that creates a new <textarea> when a button is
I've just wasted the past two hours of my life trying to create a
Just created a WSS site with a some custom web-parts. But I get an
Just created an acc on SO to ask this :) Assuming this simplified example:

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.