Solution
Since my search of the community showed marginal information on this topic, I am sharing my solution. I added a callback function on my data controller. Then upon closer inspection of How to tell UICollectionView about your content, I realized that I could simplly toggle the data source as indicated below (so I did a combination of both):
Please note the multiple options mentioned on how to get a UICollectionView to update itself.
Details
In my .h file for my data controller
//above @interface
typedef void (^CallbackBlock)();
//within @interface
@property (strong, nonatomic) CallbackBlock onDataUpdated;
//within my data controller method where data was changed
[DataManager sharedManager].onDataUpdated(); //singleton, i know...
//alternative to above singleton
__weak DataManager* weakSelf = [[DataManager alloc]init];
weakSelf.onDataUpdated();
//In my UIViewController (B) subclass
@property (strong,nonatomic)DataManager* controller;
//In my view did load of UIVC (B)
self.controller = [DataManager sharedManager];
__weak ProgressViewController* weakSelf = self;
self.controller.onDataUpdated = ^(){
//perform my action
[weakSelf setData:nil]; //remove existing data
[weakSelf setData:[self getSomeData]]; //get some new data
[[weakSelf progressCollectionView]reloadData];
[[weakSelf progressCollectionView] setNeedsDisplay];
};
End result:
- UIVC (A) receives button click
- Data Manager class fires the data updated event at end of method execution for step 1
- UIVC (B) instantly reloads the data without refreshing other subviews of UIVC (A)