Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8995567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:38:14+00:00 2026-06-15T23:38:14+00:00

-(void)backAction:(id)sender { SecondViewController *viewCtrl = [[SecondViewController alloc] init]; [self.presentingViewController dismissModalViewControllerAnimated:NO]; [self.presentingViewController presentModalViewController:viewCtrl animated:YES]; }

  • 0
-(void)backAction:(id)sender
{ 
   SecondViewController *viewCtrl = [[SecondViewController alloc] init];

   [self.presentingViewController dismissModalViewControllerAnimated:NO];

   [self.presentingViewController presentModalViewController:viewCtrl animated:YES];
}

I want to dismissModalViewControllerAnimated the current controller,then present a new controller. But it only dismissModalViewControllerAnimated:NO.

why?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T23:38:15+00:00Added an answer on June 15, 2026 at 11:38 pm

    In this line, you are already dismissing the view controller

    [self.presentingViewController dismissModalViewControllerAnimated:NO];
    

    Then in the next line you are trying to preset a modal view using the view controller that was already dismissed.

    [self.presentingViewController presentModalViewController:viewCtrl animated:YES];
    

    Instead try presenting the modal view using a the parent view controller (if you have any) of both these views. You can also fire a notification to your parent view controller after dismissing the first view so that you can launch the second modal view from the parent view controller.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

-(void)mailComposeController:(MFMailComposeViewController *)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError *)error NSString *eventResult = nil; [self dismissModalViewControllerAnimated:YES]; switch (result) {
- (void)viewDidLoad { [super viewDidLoad]; ac = [[AddContacts alloc]init]; self.navigationController = [[UINavigationController alloc] initWithRootViewController:ac];
- (void)fadeOutSplash { UIImageView *splash = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@Default-Landscape~ipad.png]]; [self.window.rootViewController.view addSubview:splash]; // <--
- (void)viewDidLoad { NSOperationQueue *operationQueue = [[NSOperationQueue alloc]init]; NSInvocationOperation *downloadImageOperation = [[NSInvocationOperation alloc] initWithTarget:[ImageDownloader
-(void)setUserFilters{ //init the user filters array userFilters = [[NSMutableArray alloc] init]; SearchCriteria *tmpSc= [[SearchCriteria
- (void)showMusicPlayer { [MediaPlayController releaseInstance]; MusicPlayController *musicPlayController = [[MusicPlayController alloc] init]; MusicPlayerViewController *musicPlayerViewController =
- (void)viewDidLoad{ UIView *baseView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)]; [self.view addSubview:baseView]; //
- (void)viewDidLoad { webCollectionOnScroller=[[NSMutableArray alloc] init]; scroll = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 370, 320, 94)];
- (void)TargetHit:(int)target{ void (^threadBlock)(void) = ^{ NSLog(@respond to selector %d, [self respondsToSelector:@selector(changeImageOfTarget:)]); [[NSOperationQueue mainQueue]
- (void)connectionDidFinishLoading:(NSURLConnection *)connection { self.listFeedConnection = nil; // release our connection [UIApplication sharedApplication].networkActivityIndicatorVisible =

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.