Warning: Attempt to present <ResetSigninDetailsViewController: 0x8ca9640> on <UINavigationController: 0x8ca44f0> while a presentation is in progress

StackOverflow https://stackoverflow.com/questions/23324015

  •  10-07-2023
  •  | 
  •  

Question

I'm getting warning like this Warning: Attempt to present ResetSigninDetailsViewController: 0x8ca9640 on UINavigationController: 0x8ca44f0 while a presentation is in progress! and also i'm sending an array to ResetSigninDetailsViewController in prepare for segue method,even the array in ResetSigninDetailsViewController is empty always... please give a better soluton thanks in advance :)

- (IBAction)didClickCantAccessMyAccount:(id)sender
    {


        [self performSegueWithIdentifier:@"ResetSigninDetailsView" sender:self];

        [self dismissViewControllerAnimated:YES completion:nil];

      // when clicked the button the ResetSigninDetailsViewController have to be 
      load with getting array loaded in  that(ResetSigninDetailsViewController)


    }
    - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender

    {
        if ([segue.identifier isEqualToString:@"ResetSigninDetailsView"])
        {

            ResetSigninDetailsViewController *resetSigninDetailsObject =( ResetSigninDetailsViewController *)segue.destinationViewController;

            resetSigninDetailsObject.userDetailsArray = userInformationArray;

        //userInformationArray is an array in current viewcontroller

        }
    }
Était-ce utile?

La solution

I think that this:

[self performSegueWithIdentifier:@"ResetSigninDetailsView" sender:self];

[self dismissViewControllerAnimated:YES completion:nil]

Should be:

[self dismissViewControllerAnimated:YES completion:^{
    [self performSegueWithIdentifier:@"ResetSigninDetailsView" sender:self];
}];

Autres conseils

i think

[self performSegueWithIdentifier:@"ResetSigninDetailsView" sender:self];

should be enough as long as it was a PUSH segue

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top