UIView
#import <QuartzCore/QuartzCore.h>
drawRect:
- (void)drawRect:(CGRect)rect{
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetLineWidth(context, 2.0f);
CGContextMoveToPoint(context, 0, self.frame.size.height);
CGContextAddLineToPoint(context,
self.frame.size.width,
self.frame.size.height);
CGContextSetStrokeColorWithColor(context, [UIColor redColor].CGColor);
CGContextStrokePath(context);
}
, ,
