瀏覽代碼

login flow

Marino Faggiana 7 年之前
父節點
當前提交
ea1dc40eab
共有 1 個文件被更改,包括 4 次插入5 次删除
  1. 4 5
      iOSClient/Login/CCLogin.m

+ 4 - 5
iOSClient/Login/CCLogin.m

@@ -237,12 +237,11 @@
                         
                     } else {
                         
-                        _imageUser.hidden = NO;
-                        _user.hidden = NO;
-                        _imagePassword.hidden = NO;
-                        _password.hidden = NO;
+                        UIAlertController *alertController = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"_connection_error_", nil) message:[error localizedDescription] preferredStyle:UIAlertControllerStyleAlert];
+                        UIAlertAction *okAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"_ok_", nil) style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {}];
                         
-                        [self.loginTypeView setTitle:NSLocalizedString(@"_web_login_", nil) forState:UIControlStateNormal];
+                        [alertController addAction:okAction];
+                        [self presentViewController:alertController animated:YES completion:nil];
                     }
 
                 } else {