Skip to content

Instantly share code, notes, and snippets.

View webcracy's full-sized avatar

Alexandre Loureiro Solleiro webcracy

View GitHub Profile
@webcracy
webcracy / defaults.css
Created August 18, 2010 00:44
Styles for simple FamFamFam icons
/* Styles for p, div or span with nice FamFamFam icons, to use around a link*/
.add {font-size: 12px; background: url('/images/icons/add.png') 0 0 no-repeat; padding-left: 18px; line-height: 16px; font-weight: normal;}
.new_password {font-size: 12px; background: url('/images/icons/lock_go.png') 0 0 no-repeat; padding-left: 18px; line-height: 16px; font-weight: normal;}
.ok {font-size: 12px; background: url('/images/icons/accept.png') 0 0 no-repeat; padding-left: 18px; line-height: 16px; font-weight: normal;}
.edit {font-size: 12px; background: url('/images/icons/pencil.png') 0 0 no-repeat; padding-left: 18px; line-height: 16px; font-weight: normal;}
.delete {font-size: 12px; background: url('/images/icons/delete.png') 0 0 no-repeat; padding-left: 18px; line-height: 16px; font-weight: normal;}
.show {font-size: 12px; background: url('/images/icons/magnifier.png') 0 0 no-repeat; padding-left: 18px; line-height: 16px; font-weight: normal;}
@apisit
apisit / gist:2970980
Created June 22, 2012 07:23
hide "Cancel" button ABPeoplePickerNavigationController and add another button performs like Cancel button.
//picker is ABPeoplePickerNavigationController
[self presentModalViewController:picker animated:YES];
UIButton* backButton= [[UIButton alloc]initWithFrame:CGRectMake(9, 25, 35, 35)];
[backButton setImage:[UIImage imageNamed:@"btnBack.png"] forState:UIControlStateNormal];
[backButton addTarget:picker.topViewController.navigationItem.rightBarButtonItem.target action:picker.topViewController.navigationItem.rightBarButtonItem.action forControlEvents:UIControlEventTouchUpInside];
[picker.navigationBar.superview addSubview:backButton];
//or you can use leftBarButtonItem instead of UIButton
//picker.topViewController.navigationItem.leftBarButtonItem= [[UIBarButtonItem alloc]initWithCustomView:backButton];
picker.topViewController.navigationItem.rightBarButtonItem=nil;