I have GridViewController.
@interface GridViewController : UIViewController <AQGridViewDelegate, AQGridViewDataSource, LoginViewControllerDelegate, IconDownloaderDelegate, UIScrollViewDelegate> {
NSArray *objects; //main data model
NSMutableDictionary *imageDownloadsInProgress;
}
@property (nonatomic, retain) IBOutlet AQGridView *gridView;
I need to call reloadData method to my gridview.
When I call [self.gridView reloadData]; in GridViewController.m (viewDidLoad),
it reloads with no problem.
But I need to call this method in AppDelegate.m
so I import “GridViewController.h” in AppDelegate.m
#import "AppDelegate.h"
#import "GridViewController.h"
and call the method,
[gridViewController.gridView reloadData];
It’s not working.
How can I call this method to GridViewController’s gridView from my delegate.m?
Try to post a notification in your AppDelegate that your GridViewController will catch.
In AppDelegate.m in a place there you need to call your grid reload code:
In your GridViewController’s viewDidLoad:
In your GridViewController’s viewDidUnload:
And your need to add method to your GridViewController: