Skip to content

Instantly share code, notes, and snippets.

@OmidH
Last active December 11, 2015 09:08
Show Gist options
  • Save OmidH/4577369 to your computer and use it in GitHub Desktop.
Save OmidH/4577369 to your computer and use it in GitHub Desktop.
minmal Table View Delegates (for copy paste)
#pragma mark - UITableView
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return 0;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"CellIdentifier";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}
cell.textLabel.text = @"";
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
return cell;
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment