Hello,
I have a simple login form in my application, when I press login I simply want the login button to get disabled.
When I press the button I call a function, inside it I disable the button and call a NSInvocationOperation that invokes the login code, that works so far.
The login code loads a new view controller on success, that view controller is technically running in the operation that I spawned and not the main thread, I don't know if that's the best practice but I don't mind much, my problem is that I can't start any timers from my new view controller (the timer code works fine if I load the login page from the main thread, but if I do that I can't disable the login button until the login code is finished).
Any ideas how to solve this? or any better implementations? any help would be appreciated
I have a simple login form in my application, when I press login I simply want the login button to get disabled.
When I press the button I call a function, inside it I disable the button and call a NSInvocationOperation that invokes the login code, that works so far.
The login code loads a new view controller on success, that view controller is technically running in the operation that I spawned and not the main thread, I don't know if that's the best practice but I don't mind much, my problem is that I can't start any timers from my new view controller (the timer code works fine if I load the login page from the main thread, but if I do that I can't disable the login button until the login code is finished).
Any ideas how to solve this? or any better implementations? any help would be appreciated