mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-30 13:16:58 +02:00
MXKDataSource refactoring
Table view cell are now defined at view controller level.
This commit is contained in:
@@ -17,6 +17,8 @@
|
||||
#import "RecentsViewController.h"
|
||||
#import "RoomViewController.h"
|
||||
|
||||
#import "RecentTableViewCell.h"
|
||||
|
||||
#import "RageShakeManager.h"
|
||||
|
||||
#import "NSBundle+MatrixKit.h"
|
||||
@@ -76,6 +78,9 @@
|
||||
|
||||
// The view controller handles itself the selected recent
|
||||
self.delegate = self;
|
||||
|
||||
// Register here the customized cell view class used to render recents
|
||||
[self.recentsTableView registerNib:RecentTableViewCell.nib forCellReuseIdentifier:RecentTableViewCell.defaultReuseIdentifier];
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
@@ -417,6 +422,18 @@
|
||||
|
||||
#pragma mark - MXKDataSourceDelegate
|
||||
|
||||
- (Class<MXKCellRendering>)cellViewClassForCellData:(MXKCellData*)cellData
|
||||
{
|
||||
// Return the customized recent table view cell
|
||||
return RecentTableViewCell.class;
|
||||
}
|
||||
|
||||
- (NSString *)cellReuseIdentifierForCellData:(MXKCellData*)cellData
|
||||
{
|
||||
// Return the customized recent table view cell identifier
|
||||
return RecentTableViewCell.defaultReuseIdentifier;
|
||||
}
|
||||
|
||||
- (void)dataSource:(MXKDataSource *)dataSource didCellChange:(id)changes
|
||||
{
|
||||
[self.recentsTableView reloadData];
|
||||
|
||||
Reference in New Issue
Block a user