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?
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…
Then use…
And finally add the following line to slideAuthFormUp….
You may need to play with the 0.2 delay…