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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T21:47:08+00:00 2026-06-17T21:47:08+00:00

I have a custom data controller that I use for my application and within

  • 0

I have a custom data controller that I use for my application and within it I have some delegate methods I have set up. They all work but not when I want them too. When I call [dataController refreshData] I have a delegate method refreshDidStart and refreshDidFinishWithoutError. I allocate data controller, set the delegate to self and call refreshData in applicationDidFinishLaunching but the delegate methods aren’t refreshing the tableviews in the view controllers when the method is done being executed. But when I set up a refresh UIBarButtonItem to call [dataController refreshData], the refreshDidFinish delegate method is called and does what is is suppose to. I believe it has to do with the split view controller I am using. Below is the code:

App Delegate:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{

    dataController = [[DataController alloc] init];
    [dataController setDelegate:self];
    [dataController refreshData];

}

MasterViewController:

- (void)viewDidLoad
{
    [super viewDidLoad];

    dataController = [[DataController alloc] init];
    [dataController setDelegate:self];

    self.tableView.backgroundView = nil;
    self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"texture3.png"]];
}

- (void)refreshDataDidStart:(DataController *)view {

    MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
    hud.labelText = @"Loading";
}

- (void)refreshDataDidFinishWithoutError:(DataController *)view {

    [callsTableView reloadData];
    [MBProgressHUD hideHUDForView:self.view animated:YES];
}

- (void)refreshDataDidFailWithError:(DataController *)view withError:(NSError *)error {

    [MBProgressHUD hideHUDForView:self.view animated:YES];

    NSLog(@"%@", error.localizedDescription);
}
  • 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-17T21:47:10+00:00Added an answer on June 17, 2026 at 9:47 pm

    In your App Delegate, you are setting DataController’s delegate to be the App Delegate. So the delegate methods that get called need to be in your App Delegate class code.

    In your MasterViewController, you’re setting the DataController’s delegate to be the MasterViewController, so the DataController’s delegate methods get called in the MasterViewController class.

    You will need to add DataController delegate methods to your App Delegate code to triger refreshing the table view, perhaps by using NSNotificationCenter. Or perhaps it would be better to get the App Delegate to tell the MasterViewController to call refreshData on its DataController.

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

Sidebar

Related Questions

How do i select elements that have my custom data attribute data-validate with jQuery
I have assigned a custom data attribute to some circles added to the Raphael
I am trying to have a tree display custom data that looks like this.
I have a custom list view that is getting data from server and changing
I have written a custom Windows Service that writes data to a custom Event
We have created a custom dataset and populating it with some data. Before adding
I have a custom view controller that implements the from UITableViewDataSource and UITableViewDelegate protocols.
I have created a custom caching provider for my MVC application. I will use
I have a non document-based Core Data application. There's an NSTreeController that manages a
I am developing RESTful API for my application. All getters (that use HTTP GET)

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.