您好,登錄后才能下訂單哦!
//畫線
UIImageView *p_w_picpathView = [[UIImageViewalloc]initWithFrame:CGRectMake(0, 80, SCREENWIDTH, 20)];
[self.viewaddSubview:p_w_picpathView];
UIGraphicsBeginImageContext(p_w_picpathView.frame.size);
[p_w_picpathView.p_w_picpathdrawInRect:CGRectMake(0, 0, p_w_picpathView1.frame.size.width, p_w_picpathView1.frame.size.height)];
CGContextSetLineCap(UIGraphicsGetCurrentContext(), kCGLineCapRound);
CGFloat ls[] = {
5,5
};
CGContextRef context =UIGraphicsGetCurrentContext();
CGContextSaveGState(context);
CGContextSetLineWidth(context, 0.4);
CGContextSetStrokeColorWithColor(context, [UIColorblackColor].CGColor);
CGContextSetLineDash(context, 0, ls, 2);
CGContextBeginPath(context);
CGContextMoveToPoint(context, 5.0, 20.0);
CGContextAddLineToPoint(context, 310.0, 20.0);
CGContextStrokePath(context);
CGContextRestoreGState(context);
p_w_picpathView.p_w_picpath = UIGraphicsGetImageFromCurrentImageContext();
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。