Skip to content

Instantly share code, notes, and snippets.

@Fuitad
Forked from willbailey/gist:383839
Created May 14, 2010 02:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Fuitad/400745 to your computer and use it in GitHub Desktop.
Save Fuitad/400745 to your computer and use it in GitHub Desktop.
- (TTStyle*)imageThumbView:(UIControlState)state {
TTBoxStyle* boxStyle = [TTBoxStyle styleWithMargin:UIEdgeInsetsMake(4, 4, 4, 4) next:nil];
TTStyle* imageStyle = [TTImageStyle styleWithImageURL:nil
defaultImage:nil
contentMode:UIViewContentModeScaleAspectFit
size:CGSizeZero next:boxStyle];
TTPartStyle* imagePart = [TTPartStyle styleWithName:@"image" style:imageStyle next:nil];
TTStyle* contentStyle = [TTContentStyle styleWithNext:imagePart];
TTStyle* fillStyle = [TTSolidFillStyle styleWithColor:hexColor(0xcccccc) next:contentStyle];
TTStyle* whiteBorder = [TTSolidBorderStyle styleWithColor:hexColor(0xffffff) width:2 next:fillStyle];
TTStyle* shadowStyle = [TTShadowStyle styleWithColor:hexColor(0xcccccc) blur:4 offset:CGSizeMake(2, 2) next:whiteBorder];
return shadowStyle;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment