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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T20:38:10+00:00 2026-06-09T20:38:10+00:00

I have a -(void) method in my main UITableView class, which I use to

  • 0

I have a -(void) method in my main UITableView class, which I use to refresh the data. It’s somewhat complex, so I’m not going to post it here, but it is also called during viewWillAppear, so every time the tableView appears, the data is refreshed properly, except when it is opened from multitasking.

I know that it is just supposed to provide the exact suspended state, but in my type of app, it needs to be refreshed when you open the app, every time.

I’ve successfully done this:

- (void)applicationWillEnterForeground:(UIApplication *)application
{
    [self.window.rootViewController viewWillAppear:YES];
}  

Which refreshes the data perfectly, but creates a number of other problems, like screwing up the popViewController animation in my UINavigationController. I’m guessing that’s not the best way to do it in the first place. (Anyone know how to fix that?)

What I want to do is to just perform my refreshTableviewData method whenever I launch the app, including when it’s multitasking.

Not sure where to go from here, but I would hugely appreciate any suggestions!

  • 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-09T20:38:11+00:00Added an answer on June 9, 2026 at 8:38 pm

    I’ll throw some ideas out, which may or may not apply, but since I don’t have equivalent code to test these against, you’ll have to try them instead of me. 🙂

    Since viewWillAppear: has to call super viewWillAppear:, I’m thinking there’s some special UIViewController magic that happens there, that perhaps shouldn’t happen at that point in the app’s loading process. You say you have a refreshTableviewData method, so why not invoke that in applicationWillEnterForeground:, or at least try to find the bare minimum you can do to refresh your table without calling viewWillAppear.

    Other alternatives: you could also have your view controller register for /UIApplicationWillEnterForegroundNotification. Or if that doesn’t work, you could try using applicationDidBecomeActive (and/or the equivalent notification). As a last resort, (and this is a borderline hack) when you load up the app, you could put a “Refreshing data…” message on screen, then use an NSTimer to refresh your table’s data, say, 1/4 or 1/2 second later.

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

Sidebar

Related Questions

I have the following code : public class Main { public void method(Object o)
I have a Game class that has a -(void) play method which will be
I have new problem. My code: .method public static void Main() cil managed {
I have a private variable in my class: BOOL isEnabled; and a method: -(void)
So i have an image being drawn inside a void method in my main
I'm trying to have method void run( string method ) which would run method
I have one clarification, class Foo { } main() { Foo obj; //1 method(obj);
This is getting made in a static void method in the main class. (class
Imagine I have a method: void Method(bool parameter){ if(parameter){ // first case } else
I have a method -(void)myMethod:(MyObject*)obj And I am detaching a new thread [NSThread detachNewThreadSelector:@selector(myMethod)

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.