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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T14:19:57+00:00 2026-05-24T14:19:57+00:00

Except for the first time a tab is switched-to, when the ViewDidLoad is initially

  • 0

Except for the first time a tab is switched-to, when the ViewDidLoad is initially triggered, all subsequent actions of switching to (reselecting) that tab doesn’t seem to trigger ViewDidLoad, nor any other method. The view just seemed to be cached and reshown instantly, just the way it was left when the user switched away from that tab. However, when a particular tab gets reselected by the user, I need to refresh its view. Thus, if possible, I need to somehow trigger a method from within the view without additional user interaction (after the tab reselection).

I do know there’s a method in the UITabBarDelegate that is supposed to get called before or after tab switching occurs, but I wouldn’t know if that would be the way to go to trigger a method call from within the tab’s view upon reactivation of said tab. I don’t know how I’d access the already active instance of the tab’s view from within the delegate. Any direction on this would be greatly helpful!

  • 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-24T14:19:58+00:00Added an answer on May 24, 2026 at 2:19 pm

    When using UITabBar, your views are kept alive unless a memory warning is received and they have to be deallocated. Because they are kept perpetually alive, viewDidLoad will only be called once (unless your view is unloaded due to a memory warning).

    viewWillAppear and viewDidAppear will be called each time that view will/did show on the screen, so this is where you’d want to refresh your view or data.

    viewWillAppear is better to use in instances that you want to update anything on the view before it is seen by the user. For instance, setting UILabels or UITextFields to clear data. This would prevent the user from seeing a quick flash of the old data before it is cleared out. Running anything in this method that will use significant system resources or take a long time (ie. webservices) may slow your app and will prevent you from showing the UIActivityIndicator simultaneously, as this is before the view actually appears.

    viewDidAppear is useful for anything that can be updated after the view is already shown, such as webservices from the previous example.

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

Sidebar

Related Questions

First of all I guess that fatal error: maximum execution time exceeded in PHP
i need to redirect all of the stdout of a program except the first
Using jQuery, how do I delete all rows in a table except the first?
For all major browsers (except IE), the JavaScript onload event doesn’t fire when the
First time overflowing the stack. I'm making a website with several html pages that
I'm working with QGraphicsView/Scene for the first time. This is in PyQt, but except
I have some processing that can take up to 5+ seconds the first time
After the FBML problems I switched to iFrame apps. All well for now except
I´m configuring Redmine for the first time. Everything works fine except for the incoming
I'm trying to add a space before every capital letter, except the first one.

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.