Skip to content

Instantly share code, notes, and snippets.

View d-amend's full-sized avatar

David Amend d-amend

  • Universität Siegen
  • Siegen
View GitHub Profile
@steipete
steipete / AppDelegate.m
Last active December 13, 2015 17:29
Hook onto NSNotificationCenter to see all notifications.
[[NSNotificationCenter defaultCenter] addObserverForName:nil object:nil queue:nil usingBlock:^(NSNotification *note) {
NSLog(@"%@: %@", note.name, note.userInfo);
}];
@d-amend
d-amend / gist:4206103
Created December 4, 2012 16:51
Selecting UITableViewCells in grouped UITableViews with custom color or view
#import <QuartzCore/QuartzCore.h>
@implementation CustomTableViewController
-(void)setSelectionViewForCell:(UITableViewCell*)cell withRoundedRectCorners:(UIRectCorner)rectCorners
{
CGRect cellRect = CGRectMake(0, 0, cell.bounds.size.width-18, cell.bounds.size.height);
UIView *view = [[UIView alloc] initWithFrame:cellRect];
if (rectCorners != 0) { //we need rounded corners, beginning or end of a tableViewSection