tags:

views:

246

answers:

2

I have a login for in which i need an activityindicator to be shown just after i press login button. In the button action i am calling my method to login a user (i have called [sratAnimating] in the top of the method).

But issue is that, when i press login, after excecuting the logic only its showing activity indicator. Why is this ? any way to show this first and then the logic execution ? plz help

A: 

Try to start indicator in other thread

UIActivityIndicatorView *aInd;
...
[aInd performSelectorInBackground: @selector(startAnimating) withObject: nil];
oxigen
it works..! Thanks
Sreehari
A: 

Thanks for the replay. I was able to get it worked. I have one more question, there is a textfield to enter PIN in my login form. When i press "login" button i call the following method:

  • (IBAction) loginBeforeAction:(id) sender { [pin resignFirstResponder]; [progressView performSelectorInBackground:@selector(startAnimating) withObject:nil]; [self login]; }

but i the number pad is not hiding before the control moves to login method. In effect, i am can see the progress view with the number pad up. Is there any way to hide the number pad first and then show progress view ? plz help

Sreehari
Call the method [textField resignFirstResponder]; to hide the number pad.
iPhoney