在ios 8.3中退出键盘后不会退出

在ios 8.3中退出键盘后不会退出,ios,ios8.3,Ios,Ios8.3,一旦收到服务器的响应,我将重新设置文本字段。 但在ios 8.3上,它并没有放弃键盘 [self.view endEditing:NO]; 这就是我正在做的。我已经辞职了文本字段,在收到服务器的响应后,但并没有辞职。同时显示警报和键盘 它在iOS 8.2上工作 这是我的代码 -(void)reciveResponseForEmail { [internetDownTimer invalidate]; [self.emailTextField resignFirstRespond

一旦收到服务器的响应,我将重新设置文本字段。 但在ios 8.3上,它并没有放弃键盘

[self.view endEditing:NO];
这就是我正在做的。我已经辞职了文本字段,在收到服务器的响应后,但并没有辞职。同时显示警报和键盘

它在iOS 8.2上工作

这是我的代码

-(void)reciveResponseForEmail
{
    [internetDownTimer invalidate];
    [self.emailTextField resignFirstResponder];  //resign text feild
    [ActivityIndicatorUtility finishedWaiting];

    if ([[responseDictionary valueForKey:@"success"] integerValue]==1)
    {
        RegistryConfirmViewController *objRegConfirmVC=[[RegistryConfirmViewController alloc]initWithNibName:@"RegistryConfirmViewController" bundle:[NSBundle mainBundle]];
        objRegConfirmVC.signRegistryDetailInfoDict=(NSMutableDictionary*)[[NSDictionary alloc]initWithDictionary:responseDictionary];

        objRegConfirmVC.isFromEmail=YES;

        objRegConfirmVC.signRegistryAray=[[NSMutableArray alloc]initWithArray:self.serviceObjectArray];
        [self.navigationController pushViewController:objRegConfirmVC animated:YES];
    }
    else if (responseDictionary==nil && [responseDictionary count]== 0) //condition apply in case of SERVER failed
    {
        [self showAlertForOfflineMode];
    }
    else
    {
        float iOSVersion = [[UIDevice currentDevice].systemVersion floatValue];

        if (iOSVersion >= 8.0f)
        {

            UIAlertController *alertVC1 = [UIAlertController alertControllerWithTitle:@"Alert" message:AMLocalizedString(@"Sorry, we were unable to find any information associated with that email.", nil) preferredStyle:UIAlertControllerStyleAlert];
            UIAlertAction *cancelAction = [UIAlertAction
                                           actionWithTitle:AMLocalizedString(@"OK",nil)
                                           style:UIAlertActionStyleCancel
                                           handler:^(UIAlertAction *action)
                                           {
                                               [alertVC1 dismissViewControllerAnimated:YES completion:nil];
                                               SignRegistryViewController *objSignRegistryVC=[[SignRegistryViewController alloc]initWithNibName:@"SignRegistryViewController" bundle:[NSBundle mainBundle]];

                                               objSignRegistryVC.returningGuestEmail=[NSString stringWithFormat:@"%@",self.emailTextField.text];
                                               objSignRegistryVC.signRegistryArray=[[NSMutableArray alloc]initWithArray:self.serviceObjectArray];

                                               [self.navigationController pushViewController:objSignRegistryVC animated:NO];
                                           }];

            [alertVC1 addAction:cancelAction];

            alertVC1.modalPresentationStyle = UIModalPresentationPageSheet;
            alertVC1.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
            [self presentViewController:alertVC1 animated:NO completion:nil];
        }
        else
        {
            UIAlertView *alertMe=[[UIAlertView alloc] initWithTitle:@"Alert" message:AMLocalizedString(@"Sorry, we were unable to find any information associated with that email.", nil) delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil, nil];
            [alertMe show];
        }
    }
}

当您想隐藏键盘时,只需在视图控制器中调用它

[self.view endEditing:NO];

键盘和警报同时显示:(你是如何退出键盘的?我找不到我使用过的代码[self.emailTextField resignFirstResponder];在显示警报之前,请在尝试隐藏键盘和呼叫方代码的位置添加代码[self.view.window.rootViewController presentViewController:alertVC动画:YES completion:nil];我用它在iOS 8.3中演示了警报视图控制器,它对我很有用。