码迷,mamicode.com
首页 > 其他好文 > 详细

画选中图标

时间:2014-12-17 20:56:40      阅读:192      评论:0      收藏:0      [点我收藏+]

标签:ios

画选中图标

by 伍雪颖

bubuko.com,布布扣

- (void)drawRect:(CGRect)rect {
   
CGContextRef ctx = UIGraphicsGetCurrentContext();
   
CGContextMoveToPoint(ctx, 15, 4);
   
CGContextAddLineToPoint(ctx, 6, 13);
   
CGContextAddLineToPoint(ctx, 9, 16);
   
CGContextAddLineToPoint(ctx, 18, 7);
   
CGContextClosePath(ctx);
   
    [[
UIColor clearColor] setStroke];
    [
DARKCOLOR setFill];
   
CGContextDrawPath(ctx, kCGPathFillStroke);
   
   
CGContextRef ctx2 = UIGraphicsGetCurrentContext();
   
CGContextMoveToPoint(ctx2, 5, 7);
   
CGContextAddLineToPoint(ctx2, 2, 10);
   
CGContextAddLineToPoint(ctx2, 9, 16);
   
CGContextAddLineToPoint(ctx2, 12, 13);
   
CGContextClosePath(ctx2);
   
    [[
UIColor clearColor] setStroke];
    [
DARKCOLOR setFill];
   
CGContextDrawPath(ctx2, kCGPathFillStroke);
}

画选中图标

标签:ios

原文地址:http://blog.csdn.net/rainlesvio/article/details/41985997

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!