Created
February 3, 2012 22:36
-
-
Save jodell/1733401 to your computer and use it in GitHub Desktop.
2px stroke line
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Draw a 2px stroke line at the bottom of the the view. | |
- (void)drawRect:(CGRect)rect { | |
CGContextRef context = UIGraphicsGetCurrentContext(); | |
CGContextSetStrokeColorWithColor(context, [UIColor whiteColor].CGColor); | |
CGContextSetLineWidth(context, 2.0); | |
CGContextMoveToPoint(context, 0, CGRectGetMaxY(rect)); | |
CGContextAddLineToPoint(context, CGRectGetMaxX(rect), CGRectGetMaxY(rect)); | |
CGContextStrokePath(context); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment