I have a popover view that I added a PFQueryTableViewController too, as a childviewController. I have a button on the popover that, when pressed, should reload the tableview in the PFQueryTableViewController.
Here is the code in the buttonPressed method that should do this:
NotificationsTableViewController *note = (NotificationsTableViewController *)self.childViewControllers[0];
[note loadObjects];
[note.tableView reloadData];
The table is not reloaded, though, and the only way I can get it to reload is by instantiating a whole new controller and adding it to the popover, which is not something I want to end up doing.
Here is some more code:
//NotificationsPopoverController
@class NotificationsTableViewController;
@protocol PopDelegate <NSObject>
-(void) changedQue;
@end
@interface NotificationsPopoverController : PDPopoverController
@property (nonatomic, assign) id<PopDelegate> myDelegate;
@property NotificationsTableViewController *noti;
When my button is pressed I call [self.myDelegate changedQue];
//NotificationsTableViewController.h
@interface NotificationsTableViewController : PFQueryTableViewController <PopDelegate>
//NotificationsTableViewController.m
-(void)changedQue
{
NSLog(@"Did it work?");
[self.tableView reloadData];
[self loadObjects];
}
The log statement is not printed for some reason, not sure why...