I'm trying to subclass a UIViewController that has an embedded UITableView and is a UiTableViewDataSource and UITableViewDelegate.
The master class looks like this:
@interface PFUIViewControllerWithTable : PFUIViewController <UITableViewDelegate,UITableViewDataSource, RKObjectLoaderDelegate> {
UITableView *_tableView;
NSArray *_data;
}
@property (nonatomic,retain) UITableView *tableView;
@property (nonatomic,retain) NSArray *data;
- (void)configureCell:(PFRewardsUITableViewCell*)cell atIndexPath:(NSIndexPath *)indexPath;
and the implementation contains methods for populating the table view from the self.data property.
In the subclass, the data is populated and [self.tableView refresh] is called
@interface MySubclass : PFUIViewControllerWithTable <UITableViewDataSource, UITableViewDelegate> {
}
- (void)loadObjectsFromDataStore;
- (void)loadLiveData;
- (void)configureCell:(PFRewardsUITableViewCell*)cell atIndexPath:(NSIndexPath *)indexPath;
The UItableViewDataSource methods are never called in this configuration. The delegate and data source are set to the master class. The master class populates the tableview from the self.data property, which is modified by the subclass.
So, what is the way to subclass such a view?