IOS中如何畫一條線或者虛線

//畫線

成都創(chuàng)新互聯(lián)公司專注于成都做網(wǎng)站、成都網(wǎng)站制作、網(wǎng)頁設(shè)計、網(wǎng)站制作、網(wǎng)站開發(fā)。公司秉持“客戶至上,用心服務(wù)”的宗旨,從客戶的利益和觀點出發(fā),讓客戶在網(wǎng)絡(luò)營銷中找到自己的駐足之地。尊重和關(guān)懷每一位客戶,用嚴謹?shù)膽B(tài)度對待客戶,用專業(yè)的服務(wù)創(chuàng)造價值,成為客戶值得信賴的朋友,為客戶解除后顧之憂。

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();

網(wǎng)頁題目:IOS中如何畫一條線或者虛線
分享路徑:http://muchs.cn/article38/jophsp.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供營銷型網(wǎng)站建設(shè)網(wǎng)站設(shè)計、域名注冊網(wǎng)站改版、商城網(wǎng)站、關(guān)鍵詞優(yōu)化

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

商城網(wǎng)站建設(shè)