我有一个我画的 s 数组,UIBezierPath还有一个UIImageView全部放在一个UIView. 当我绘制 aUIBezierPath并将其保存到数组中,然后添加 a UIImageView,然后绘制另一条路径时,第二条路径将出现在图像后面。有没有类似bringSubViewToFront:的东西UIBezierPath?
- (void)drawRect:(CGRect)rect
{
for(int a=0; a<_pathArray.count; a++) {
[(UIColor )[_colorArray objectAtIndex:a] setStroke];
[(UIBezierPath)[_pathArray objectAtIndex:a] strokeWithBlendMode:kCGBlendModeNormal alpha:1.0];
}
}
其中_colorArray是每个路径的颜色_pathArray数组, 是UIBezierPaths 的数组。我将 a 插入UIImageView到视图中,然后我想要做的是能够在整体上绘制UIView(包括在 顶部UIImageView)。