Hi Guys,
I have an activity indicator in my application in a number of places and I am having the same problem everywhere.
In the login page, when the user enters their details, and presses the login button, a method is called that checks if the details are right or not. While this method is being called an activity indicator is meant to show on the screen.
My problem is that the indicator shows at the end, just before the new view is loaded, rather then when the login credentials are being checked.
How can I activate it as soon as the button is pressed.
This is the method that is called when the login button is pressed:
As you can see from the method, I activate the spinner as soon as the method is called.
Any help would be greatly appreciated.
Thanks.
I have an activity indicator in my application in a number of places and I am having the same problem everywhere.
In the login page, when the user enters their details, and presses the login button, a method is called that checks if the details are right or not. While this method is being called an activity indicator is meant to show on the screen.
My problem is that the indicator shows at the end, just before the new view is loaded, rather then when the login credentials are being checked.
How can I activate it as soon as the button is pressed.
This is the method that is called when the login button is pressed:
Code:
{
self.spinner.hidden = NO;
[spinner startAnimating];
URL connection to the database
if statement check the reply for the database
if credentials are correct new page is loaded.
}
As you can see from the method, I activate the spinner as soon as the method is called.
Any help would be greatly appreciated.
Thanks.