博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
IOS画线条
阅读量:4561 次
发布时间:2019-06-08

本文共 570 字,大约阅读时间需要 1 分钟。

- (void)drawRect:(CGRect)rect
{
// draw a rounded rect bezier path filled with blue
CGContextRef aRef = UIGraphicsGetCurrentContext();
CGContextSaveGState(aRef);
UIBezierPath *bezierPath = [UIBezierPath bezierPathWithRoundedRect:rect cornerRadius:5.0f];
bezierPath.lineWidth = 5.0f;
[[UIColor blackColor] setStroke];
 
UIColor *fillColor = [UIColor colorWithRed:0.529 green:0.808 blue:0.922 alpha:1]; // color equivalent is #87ceeb
[fillColor setFill];
 
[bezierPath stroke];
[bezierPath fill];
CGContextRestoreGState(aRef);
}

转载于:https://www.cnblogs.com/wcLT/p/4753954.html

你可能感兴趣的文章
获取手机是否root信息
查看>>
json字符窜转对象
查看>>
Openssl
查看>>
【LOJ】#2536. 「CQOI2018」解锁屏幕
查看>>
Python---基础---递归
查看>>
DirectX11 With Windows SDK--07 添加光照与常用几何模型、光栅化状态
查看>>
Java核心技术36讲
查看>>
元字符
查看>>
洛谷P1209 [USACO1.3]修理牛棚 Barn Repair
查看>>
洛谷P1006 NOIP提高组2008 传纸条
查看>>
BZOJ2257: [Jsoi2009]瓶子和燃料
查看>>
Let the Balloon Rise HDU - 1004
查看>>
javascript设计模式-代理模式
查看>>
How many ways?? (hdu 2157)
查看>>
通过修改配置文件修改MySQL的时区设置
查看>>
网防G01管理检测系统Linux版安装
查看>>
傅里叶分析之掐死教程(完整版)更新于2014.06.06
查看>>
解读SSD中的Default box(Prior Box)
查看>>
如果一切需要重学,2014年应该学哪些技术?
查看>>
Python2.7-struct模块
查看>>