下面是我想在核心图形中绘制的标志。
我要做的是:
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);
}
我要结束的是下面
我的问题 :
如何添加阴影,使我的旗帜看起来像是在尾部折叠和卷曲(如上面的红旗)