i want to show an UIAlertView while the LoginProcess is working OR after the loginButton action is called. Here is my code:
- (void) btnLogin:(id) sender {
UIAlertView *alertLogin = [[UIAlertView alloc] initWithTitle:nil message:@"\nLogin in progress, please wait!" delegate:self cancelButtonTitle:nil otherButtonTitles:nil];
[alertLogin show];
NSURL *url = [NSURL URLWithString:@"http://www.example.com/login/"];
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
[request setPostValue:username forKey:@"username"];
[request setPostValue:password forKey:@"pw"];
[request startSynchronous];
[request cancelAuthentication];
[...]
}
- i press the login button.
- the screen gets an gray radial overlay
3. the loginprogress is done AND NOW the UIAlertView appears very very shortly.
I want to display the UIView WHILE the login is in progress and not after.
I cant find out why this appears after the progress.
Need help.
Thanks a lot for any suggestions.
In .h of your class
In .m btnLogin Method
[alert show];
In didRecieveData Method of connection, you will write, or if you are parsing, then didEndDocument method of parser, you can do