Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Allow setting the nibName on data renderer.

  • Loading branch information...
commit c7dab1e8903cc8ab243d8fc2a778aabad60342a0 1 parent 5e3682e
@jasperblues jasperblues authored
View
7 Source/Main/UserInterface/DataRenderer/expanz_ui_AbstractDataRenderer.h
@@ -20,6 +20,7 @@
NSMutableArray* _filteredListContent;
NSUInteger _cellHeight;
+ NSString* _nibNameForTableCell;
}
@@ -43,6 +44,8 @@
*/
@property(nonatomic, strong, readonly) UISearchDisplayController* searchController;
+@property(nonatomic, strong) NSString* nibNameForTableCell;
+
/**
* Injection point for loading custom table cells from a nib.
*/
@@ -74,10 +77,6 @@
*/
- (void) filterContentForSearchText:(NSString*)searchText scope:(NSString*)scope;
-/**
-* Abstract method that returns the name of the nib to use.
-*/
-- (NSString*) nibNameForTableCell;
- (UITableViewCell*) loadTableCellFromNib;
View
2  Source/Main/UserInterface/DataRenderer/expanz_ui_AbstractDataRenderer.m
@@ -11,7 +11,6 @@
#import "expanz_ui_AbstractDataRenderer.h"
#import "expanz_model_AbstractData.h"
-#import "expanz_ui_NavigationManager.h"
@implementation expanz_ui_AbstractDataRenderer
@@ -21,6 +20,7 @@ @implementation expanz_ui_AbstractDataRenderer
@synthesize activityName = _activityName;
@synthesize searchController = _searchController;
@synthesize tableCell = _tableCell;
+@synthesize nibNameForTableCell = _nibNameForTableCell;
/* ================================================== Initializers ================================================== */
View
6 Source/Main/UserInterface/DataRenderer/expanz_ui_GridDataRenderer.m
@@ -31,6 +31,7 @@ - (Row*) tableView:(UITableView*)tableView rowForIndexPath:(NSIndexPath*)indexPa
- (void) thumbnailTableViewCell:(ThumbnailTableCell*)cell setThumbnailImageFor:(Row*)row;
@end
+
/* ================================================================================================================== */
@implementation expanz_ui_GridDataRenderer
@@ -147,7 +148,10 @@ - (void) filterContentForSearchText:(NSString*)searchText scope:(NSString*)scope
}
- (NSString*) nibNameForTableCell {
- return @"DefaultTableCellForGridData";
+ if ([_nibNameForTableCell length] == 0) {
+ _nibNameForTableCell = @"DefaultTableCellForGridData";
+ }
+ return _nibNameForTableCell;
}
View
5 Source/Main/UserInterface/DataRenderer/expanz_ui_TreeDataRenderer.m
@@ -111,7 +111,10 @@ - (void) filterContentForSearchText:(NSString*)searchText scope:(NSString*)scope
}
- (NSString*) nibNameForTableCell {
- return @"DefaultTableCellForTreeData";
+ if ([_nibNameForTableCell length] == 0) {
+ _nibNameForTableCell = @"DefaultTableCellForTreeData";
+ }
+ return _nibNameForTableCell;
}
/* ================================================== Private Methods =============================================== */
Please sign in to comment.
Something went wrong with that request. Please try again.