@end
#import "BIDCutView.h"
@implementation BIDCutView
@synthesize delegate=_delegate;
- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
// Initialization code
}
return self;
}
- (void)drawRect:(CGRect)rect
{
CGContextRef ctx = UIGraphicsGetCurrentContext();
CGContextSetLineWidth(ctx, 1.5);
CGContextSetStrokeColorWithColor(ctx, [UIColor
purpleColor].CGColor);
CGFloat lengths[2] = {15.0,5.0};
CGContextSetLineDash(ctx, 2, lengths, 2);
CGContextStrokeRect(ctx, targetRect); //画虚线矩形
找软件资料,就到一览软件文库