Skip to content

Instantly share code, notes, and snippets.

View ferbass's full-sized avatar
:octocat:
ι(`ロ´)ノ

Fernando Bass ferbass

:octocat:
ι(`ロ´)ノ
View GitHub Profile
@ferbass
ferbass / gist:c5a6993cb7b8b56fadbe
Created November 28, 2014 02:12
gitignore previously tracked files
git ls-files --ignored --exclude-standard | xargs git rm --cached
label.font = [UIFont preferredFontForTextStyle:UIFontTextStyleBody];
label.font = UIFont.preferredFontForTextStyle(UIFontTextStyleBody)
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(didReceiveUIContentSizeCategoryDidChangeNotification:)
name:UIContentSizeCategoryDidChangeNotification object:nil];
- (void)didReceiveUIContentSizeCategoryDidChangeNotification:(NSNotification *)notification
{
label.font = [UIFont preferredFontForTextStyle:UIFontTextStyleBody];
}
NSNotificationCenter.defaultCenter().addObserver(self,
selector: "didReceiveUIContentSizeCategoryDidChangeNotification:",
name: UIContentSizeCategoryDidChangeNotification, object: nil)
func didReceiveUIContentSizeCategoryDidChangeNotification(notification: NSNotification)
{
label.font = UIFont.preferredFontForTextStyle(UIFontTextStyleBody)
}
UIFontDescriptor *descriptorFontBody = [UIFontDescriptor preferredFontDescriptorWithTextStyle:UIFontTextStyleHeadline];
CGFloat descriptorFontBodySize = [userHeadLineFont pointSize];
UIFont *bodyFont = [UIFont fontWithName:@"Zapfino" size:descriptorFontBodySize];
label.font = bodyFont;
let descriptorFontBody = UIFontDescriptor.preferredFontDescriptorWithTextStyle(UIFontTextStyleBody)
let descriptionFontBodySize = descriptorFontBody.pointSize;
let bodyFont = UIFont(name: "Zapfino", size: descriptionFontBodySize)
label.font = bodyFont;
@ferbass
ferbass / gist:1010989
Created June 6, 2011 20:09
How to remove xcode
sudo /Developer/Library/uninstall-devtools --mode=all