Skip to content

Instantly share code, notes, and snippets.

@hechen
Created August 15, 2017 02:50
Show Gist options
  • Save hechen/389ac64eb0fa30568c0a1fbc2182b602 to your computer and use it in GitHub Desktop.
Save hechen/389ac64eb0fa30568c0a1fbc2182b602 to your computer and use it in GitHub Desktop.
--- title: "UITableViewDataSource" summary: "Placeholders for required UITableViewDataSource delegate methods" platform: iOS completion-scope: Class Implementation ---
#pragma mark - UITableViewDataSource
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return <#number#>;
}
- (NSInteger)tableView:(UITableView *)tableView
numberOfRowsInSection:(NSInteger)section {
return <#number#>;
}
- (UITableViewCell *)tableView:(UITableView *)tableView
cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:<#reuseIdentifier#> forIndexPath:<#indexPath#>];
[self configureCell:cell forRowAtIndexPath:indexPath];
return cell;
}
- (void)configureCell:(UITableViewCell *)cell
forRowAtIndexPath:(NSIndexPath *)indexPath {
<#statements#>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment