我想顯示一個UIAlertView,而LoginProcess正在工作或調用loginButton動作後。這裏是我的代碼:UIAlertView出現toooo短之後loginButton動作調用
- (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];
[...]
}
- 我按下登錄按鈕。
- 屏幕得到一個灰色的徑向覆蓋
3. loginprogress完成現在的UIAlertView中顯得很很快。
我想顯示UIView WHILE登錄正在進行中,而不是之後。 我無法找出進展後出現的原因。
需要幫助。
非常感謝您的任何建議。
你好Veer,這是行不通的。屏幕在登錄進程/加載時被阻止。你有推薦MBProgressHUD,但也有同樣的問題。 – brush51