Created
March 11, 2014 12:26
-
-
Save akshay1188/9484601 to your computer and use it in GitHub Desktop.
BuiltUITableViewController boiler plate code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface TestBuiltUITableViewController () | |
@end | |
@implementation TestBuiltUITableViewController | |
- (id)initWithStyle:(UITableViewStyle)style{ | |
self = [super initWithStyle:style]; | |
if (self) { | |
// Custom initialization | |
self.enablePullToRefresh = YES; | |
self.fetchLimit = 99; | |
[self.builtQuery setCachePolicy:CACHE_ELSE_NETWORK]; | |
} | |
return self; | |
} | |
-(void)viewDidLoad{ | |
[self refresh]; | |
} | |
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath builtObject:(BuiltObject *)builtObject{ | |
static NSString *CellIdentifier = @"CellIdentifier"; | |
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; | |
if (cell == nil) { | |
cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]; | |
} | |
// cell.textLabel.text = [NSString stringWithFormat:@"%@",[builtObject objectForKey:@"key"]]; | |
return cell; | |
} | |
- (void)didReceiveMemoryWarning | |
{ | |
[super didReceiveMemoryWarning]; | |
// Dispose of any resources that can be recreated. | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment