Skip to content

Instantly share code, notes, and snippets.

View davidahouse's full-sized avatar

David House davidahouse

View GitHub Profile
@davidahouse
davidahouse / gist:4565554
Created January 18, 2013 15:56
dispatch_once to run a block of code only one time ever
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
// your code here
});
@davidahouse
davidahouse / gist:3609804
Created September 3, 2012 14:42
UITableView Simple DataSource & Delegate
#pragma mark - Table View
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return 1;