Skip to content

Instantly share code, notes, and snippets.

View rcmlee99's full-sized avatar

Roger Lee rcmlee99

  • Sydney, Australia
View GitHub Profile
.background-layers(@top, @bottom) {
background: url(@top), url(@bottom);
background-position: top center, top center;
background-attachment: fixed, fixed;
background-repeat: repeat, repeat;
-webkit-background-size: auto, cover;
-moz-background-size: auto, cover;
-o-background-size: auto, cover;
background-size: auto, cover;
}
.background-cover(@cover: cover) {
-webkit-background-size: @cover;
-moz-background-size: @cover;
-o-background-size: @cover;
background-size: @cover;
}
@rcmlee99
rcmlee99 / gist:2a3e7b7b57c91aae80d4
Created July 10, 2014 14:08
Set attributed text manually.
UIButton *btn=[UIButton buttonWithType:UIButtonTypeCustom];
btn.frame=CGRectMake(5,10,300,20);
NSMutableAttributedString *attrStr = [[NSMutableAttributedString alloc] initWithString:@" Manage\n My Trade"];
[attrStr addAttribute:NSForegroundColorAttributeName value:altColorGroup4 range:NSMakeRange(0, attrStr.length)];
[btn setAttributedTitle:attrStr forState:UIControlStateNormal];