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 6963599
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:48:51+00:00 2026-05-27T15:48:51+00:00

I have tabbar – two tabs with navigation controller in each. On second card

  • 0

I have tabbar – two tabs with navigation controller in each. On second card I change database, so i need to refresh data(I know viewWillAppear) on first card. But there is navigation controller and i can be on next view of it.

(unfortunatelly, I have tabbar with navigation bar, connected static – by .XIB)

How I can return to first view in navigation controller on first tab (from second tab) ? Or how I can push other view on it, but don’ t break navigation controller?

  • 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-05-27T15:48:52+00:00Added an answer on May 27, 2026 at 3:48 pm

    You need to pop the navigation controller in your first tab bar to root, [firstTabBarViewController.navigationController popToRootViewControllerAnimated:NO];

    Only problem with this is you need to have a reference to your first tabs view controllers.

    Another way you could do it (And i have used this method before) is to use local notifications.

    In your first view controllers viewDidLoad method add the following line to register for a notification, you can name the notification anything you like maybe something like DatabaseChangedNotification.

    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(databaeHasChanged:) name:@"DatabaseChangedNotification" object:nil]; 
    

    Then add a new (void) method called databaseHasChanged, this method will be called each time the notification is raised. Your databaseHasChanged method should look something like:

    -(void)databaseHasChanged
    {
        [self.navigationController popToRootViewControllerAnimated:NO];
    }
    

    Then in your dealloc method make sure you unregister the notification using the following code:

       [[NSNotificationCenter defaultCenter] removeObserver:self];
    

    The above code will setup your first view controller to listen and handle the DatabaseChangedNotification.

    Now all you need to do is add some code to your second view controller which changes the database. After the database has changed just fire the DatabaseChangedNotification using the following code:

    [[NSNotificationCenter defaultCenter] postNotificationName:@"DatabaseChangedNotification"
                                                        object:nil];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two tabbar items(views) that use the same data, whats the best solution
Here is the thing. I currently have a tabBar controller, with several navigation controllers
I have two view controllers in a tabbar which can both edit data. Therefore,
I want to have a TabBar controller inside a navigation controller. So that when
I have a TabBar controller with up to 9 controllers, each one has a
Hi I have a tabbar controller which includes two pages A and B. Now
I have a tabbar controllor and trying to add navigation to each control. In
I have an TabBar application with 4 tabs. All four tabs have navigation controllers.
I have two Tabbar, First is for the ApplicationTAB View and second is for
I have a tabbar-based iOS app with two tabs. When I tab into the

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.