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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T15:07:07+00:00 2026-06-03T15:07:07+00:00

I have 2 views controlled by a tab bar controller. The issue that I

  • 0

I have 2 views controlled by a tab bar controller.

The issue that I am having is that on returning to my 1st tab from my 2nd, I ideally need all of the 1st view’s data to have reloaded based on the changes I made in the 2nd tab.

It is possibly better not to explain why, as my fumbled attempts at over-complicated code with numerous work-arounds will likely alarm you.

So basically, can i get viewDidLoad to redo itself when i go back to the view from another tab?

EDIT: and the answer is: viewWillAppear instead of viewDidLoad i think (can’t answer own question for 8 hours)

  • 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-03T15:07:10+00:00Added an answer on June 3, 2026 at 3:07 pm

    Rather than reload every time on viewDidAppear, in most cases you’re better off sending a message to view 1 telling it to reload next time it appears. This avoids unnecessary reloads (which can be bad for user experience and use unnecessary bandwidth). There are a number of ways to do this depending on the screen flow in your app. One way to do it would be:

    -create an ivar BOOL shouldReload on view 1

    -whenever something happens on view 2 (or anywhere else in the application) that requires a reload of view 1 post a message to [NSNotificationCenter defaultCenter] called something like “View1ShouldReload”.

    -on load of view 1 set the shouldReload flag to NO and start listening

    -on the notification selector, set shouldReload to YES

    -on viewDidAppear check if (shouldReload) then do the reload.

    There are many other ways to do this (like delegates, singletons, whatever), but this is a simple way to make your app work more efficiently.

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

Sidebar

Related Questions

I have an application with several view controllers controlled from a tab bar controller.
I have an application that has many views (Using tab bar controller). I want
I have 2 views controlled by a tab bar view controller created by the
I am using 2 views in navigation controller in a tab bar. In that
So, basically, I have four different views that are switched via a tab bar
I am having an issue: I have a tab-bar based app. In MainWindow.xib for
I have a tab bar controller with two views. When i press a button
I have an app with tab bar controller (with 4 views controller) and it
I have an application set up where the window contains a tab bar controller
I have an application with tab bar and 3 different View Controller. one of

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.