//弹出对话框
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"提示" message:@"服务器地址可用,点击登录" preferredStyle:UIAlertControllerStyleAlert];
// 确定注销
UIAlertAction *_okAction = [UIAlertAction actionWithTitle:@"登录" style:UIAlertActionStyleDefault handler:^(UIAlertAction *_Nonnull action) {
//跳转到登陆成功后的界面
LoginViewController *mainViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"LoginViewController"];
//mainViewController.userEntity = userEntity;
[self.navigationController pushViewController:mainViewController animated:YES];
}];
_cancelAction =[UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:nil];
[alert addAction:_okAction];
[alert addAction:_cancelAction];
// 弹出对话框
[self presentViewController:alert animated:true completion:nil];