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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T02:05:46+00:00 2026-06-19T02:05:46+00:00

I have 2 classes, classA and classB In classA I have a tableview that

  • 0

I have 2 classes, classA and classB
In classA I have a tableview that works and refreshes on demand. all the delegates and datadource are fine and there’s also a property @property (nonatomic, retain) UITableView *myTableView;

I don’t want to put reloadData in viewDidAppear or viewWillAppear of classA.
I want to fire [myTable reloadData] from classB.

Thanks

  • 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-19T02:05:46+00:00Added an answer on June 19, 2026 at 2:05 am

    Use delegates to reload your tableview.

    In the class where the tableview is, write this in viewDidLoad:

    [[NSNotificationCenter defaultCenter] removeObserver:self name:@"updateLeftTable"
                                                  object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self
                                             selector:@selector(checkRes:) name:@"updateLeftTable" object:nil];
    

    Then in the same class implement its function like so:

    -(void)checkRes:(NSNotification *)notification
    {
       if ([[notification name] isEqualToString:@"updateLeftTable"])
       {
          [_rearTableView reloadData];
       }
    }
    

    Finally, in the class from where you want to reload your tableview
    paste the following line (It’s important that this line goes in the method from where you want to reload your tableview):

    [[NSNotificationCenter defaultCenter] postNotificationName:@"updateLeftTable" object:self];
    

    Tell me if you have any problems.

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

Sidebar

Related Questions

I have two classes that I am testing (let's call them ClassA and ClassB).
I have two separate classes, ClassA and ClassB, that derive from the same base
If I have three classes: ClassA ClassB ClassC They all have import statements to
I have three classes: ClassA , ClassB , ClassC . ClassC extends ClassB which
I have two classes, ClassA and ClassB , as well as a many to
I have a class ClassA that is a base class of other classes. I
I have a little C# problem. I have two classes ClassA and ClassB defined
I have two classes: class ClassA { public: ClassB *classB; int i = 100;
Here's my scenario. I have two classes ClassA and ClassB . ClassB inherits ClassA
I have two classes: abstract Entity , abstract ClassA extends Entity , ClassB extends

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.