Skip to content

Instantly share code, notes, and snippets.

@jasonmorrissey
Created August 20, 2011 09:00
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 jasonmorrissey/1158879 to your computer and use it in GitHub Desktop.
Save jasonmorrissey/1158879 to your computer and use it in GitHub Desktop.
// Alien Blue - Drawing Vertical Threadlines
#define kThreadIndentSize 20.
#define kThreadLineWidth 1.
- (void) drawThreadLinesforLevel:(NSUInteger) level
{
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetRGBFillColor(context, 0.93, 0.93, 0.93, 1.0);
for (NSUInteger i=1; i<=level; i++)
{
CGRect threadLineRect = CGRectMake(kThreadIndentSize * i - (kThreadIndentSize / 2), 0, kThreadLineWidth, self.bounds.size.height);
CGContextFillRect(context, threadLineRect);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment