答案 0 :(得分:0)
UIBezierPath *aPath = [UIBezierPath bezierPath];
// Set the starting point of the shape.
if (Flag==0) {
//First rectangle
[aPath moveToPoint:CGPointMake(0.0, 0.0)];
// Draw the lines.
[aPath addLineToPoint:CGPointMake(375.0, 0.0)];
[aPath addLineToPoint:CGPointMake(367.5, 32.8)];
[aPath addLineToPoint:CGPointMake(7.5, 32.8)];
} else {
//Second Rectangle
[aPath moveToPoint:CGPointMake(7.5, 0.0)];
[aPath addLineToPoint:CGPointMake(367.5, 0.0)];
[aPath addLineToPoint:CGPointMake(375, 32.8)];
[aPath addLineToPoint:CGPointMake(0, 32.8)];
}
[aPath closePath];
return aPath;