Skip to content

Instantly share code, notes, and snippets.

@youngshook
Created December 14, 2014 10:40
Show Gist options
  • Save youngshook/7aabedb87de9395041d2 to your computer and use it in GitHub Desktop.
Save youngshook/7aabedb87de9395041d2 to your computer and use it in GitHub Desktop.
自绘分割线
//
- (void)drawRect:(CGRect)rect
{
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetFillColorWithColor(context, [UIColor whiteColor].CGColor);
CGContextFillRect(context, rect);
CGContextSetStrokeColorWithColor(context, [UIColor colorWithRed:0xE2/255.0f green:0xE2/255.0f blue:0xE2/255.0f alpha:1].CGColor);
CGContextStrokeRect(context, CGRectMake(0, rect.size.height - 1, rect.size.width, 1));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment