0
下面是我想绘制在核心图形中的一面旗帜。如何添加阴影,核心图形
我要做的就是:
Flag.m
- (void)drawRect:(CGRect)rect {
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetLineWidth(context, 1.0);
CGContextMoveToPoint (context, 20, 10);
CGContextAddLineToPoint (context, 50, 10);
CGContextAddLineToPoint (context, 50, 90);
CGContextAddLineToPoint (context, 45, 90);
CGContextAddLineToPoint (context, 45, 95);
CGContextAddLineToPoint (context, 40, 92);
CGContextAddLineToPoint (context, 35, 90);
CGContextAddLineToPoint (context, 30, 92);
CGContextAddLineToPoint (context, 25, 95);
CGContextAddLineToPoint (context, 25, 90);
CGContextAddLineToPoint (context, 20, 90);
CGContextAddLineToPoint (context, 20, 10);
CGContextSetFillColorWithColor(context, [UIColor whiteColor].CGColor);
CGContextFillPath(context);
}
什么我结束了下面是
我的问题:
如何添加阴影所以我的国旗似乎是折叠d并在其尾部卷曲(如上面的红旗)