ios - Perform action on return key down -


How can I do an action on the press down of return key, do not press above? textFieldShouldReturn: only allows the press.

Alternatively, how can I come up with the UIActivityIndicatorView one at the beginning of IBAction on the button? Even if it is called before, it is not animated until the end, and at that time, it is said to stop animating.

Edit:

For the second question, what happens here:

  - Pressed (IBAction) button: (ID) Sender { [Indicator startup]; // do stuff ... sleep (3000000) // to describe the problem, wait 3 seconds)   

The pointer should start animating first, but it should be Animation starts after sleep () . How can I revive it before anything else?

Use UIControlEventTouchUpInside for later questions. For example ... .... [yourButton addTarget: Self-action: @electrator (for the touchupup control events): UIControlEventTouchUpInside]; - (zero) done touchup {[yourUIActivityIndicatorView Getting Started]; }

Sleep () is not working because performance is updated only after main thread return, at least I think this is the reason. But a good solution is NSTimer ...

  [NSTimer scheduled timer with time interval: 3.0 targets: self selector: @sillector (targMtod :) userInfo: zero repeats: no];    

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -