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

  • SEARCH
  • Home
  • 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 9058113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T14:38:28+00:00 2026-06-16T14:38:28+00:00

I have an app using storyboard. The layout is: Nav Controller > Login View

  • 0

I have an app using storyboard. The layout is: Nav Controller > Login View Controller > Tab Bar Controller and each tab has a Nav Controller pointing to the UIViewController for that tab. I’m trying to create a log out button that would remove the TabBarController and go back to the Login View Controller. My code is as per below:

// In log out function
[self.tabBarController dismissViewControllerAnimated:YES completion:nil];
[self performSelector:@selector(patchSelector) withObject:nil afterDelay:0.3];

-(void)patchSelector{
    [self.tabBarController.navigationController popToRootViewControllerAnimated:YES];
}

I keep getting the following error:

*** Terminating app due to uncaught exception 'UIViewControllerHierarchyInconsistency', reason: 'presentedViewController for controller is itself on dismiss for

I tried reading the following regarding this:

No visible interface for dismissModalViewControllerAnimated:completion

http://www.touchthatfruit.com/viewwillappear-and-viewdidappear-not-being-ca

UITabbarController dismiss modal UINavigationController

However, none of the above helped with the error i’m getting. Is there something i’m missing in this? The error seems to indicate that the current vc is among those getting cleaned up.

  • 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-16T14:38:31+00:00Added an answer on June 16, 2026 at 2:38 pm

    When I remove my very first UINavigationController (the one before login screen) and I change the first line above to this: [self dismissModalViewControllerAnimated:YES];, it works…but only if I make it a modal segue. Easiest solution. Not sure why my original issue was, but i was able to get around it this way atleast!

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

Sidebar

Related Questions

I set up my app using a storyboard and have my main view controller
I am building an app using storyboard. I have added a table view to
I'm using storyboard to create an iPad app. On the main view I have
I have an iPhone app that has several different view controllers. A login screen
I'm developing an iOS 5 app using Storyboard. I have UITabBarController which has 3
I'm creating an iPhone app using storyboard. I have a table view and 4
I have a storyboard based app with a navigation controller as the initial view
I have this iPad app using Storyboard. There are some file that are marked
Im using Storyboard for most screens in my iPhone app. However, I have one
I'm trying to design my app's interface in IB using a storyboard and have

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.