画一条虚线————————————————

画一条虚线————————————————,第1张

概述画一条虚线 ————————————————

下面是内存溢出 jb51.cc 通过网络收集整理的代码片段。

内存溢出小编现在分享给大家,也给大家做个参考。

 UIImageVIEw *imageVIEw1 = [[UIImageVIEw alloc]initWithFrame:CGRectMake(0,200,320,20)];    [self.vIEw addSubvIEw:imageVIEw1];            UIGraphicsBeginImageContext(imageVIEw1.frame.size);   //开始画线    [imageVIEw1.image drawInRect:CGRectMake(0,imageVIEw1.frame.size.wIDth,imageVIEw1.frame.size.height)];    CGContextSetlineCap(UIGraphicsGetCurrentContext(),kCGlineCapRound);  //设置线条终点形状            const CGfloat lengths[] = {5,3};    CGContextRef line = UIGraphicsGetCurrentContext();    CGContextSetstrokecolorWithcolor(line,[UIcolor redcolor].CGcolor);        CGContextSetlineDash(line,lengths,2);  //画虚线    CGContextMovetoPoint(line,0.0,20.0);    //开始画线    CGContextAddlinetoPoint(line,310.0,20.0);    CGContextstrokePath(line);        imageVIEw1.image = UIGraphicsGetimageFromCurrentimageContext();

以上是内存溢出(jb51.cc)为你收集整理的全部代码内容,希望文章能够帮你解决所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

总结

以上是内存溢出为你收集整理的画一条虚线 ————————————————全部内容,希望文章能够帮你解决画一条虚线 ————————————————所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1107957.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-29
下一篇2022-05-29

发表评论

登录后才能评论

评论列表(0条)

    保存