Skip to content

Instantly share code, notes, and snippets.

@akshay1188
Created March 11, 2014 12:26
Show Gist options
  • Save akshay1188/9484601 to your computer and use it in GitHub Desktop.
Save akshay1188/9484601 to your computer and use it in GitHub Desktop.
BuiltUITableViewController boiler plate code
@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