Skip to content

Instantly share code, notes, and snippets.

@dbaldwin
Created July 13, 2012 04:55
Show Gist options
  • Save dbaldwin/3102801 to your computer and use it in GitHub Desktop.
Save dbaldwin/3102801 to your computer and use it in GitHub Desktop.
iOS5 snippet for calling a welcome screen segue when a UITableView has 0 items in it
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
if(_objects.count == 0) {
[self performSegueWithIdentifier: @"welcomeSegue" sender: self];
}
return _objects.count;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment