上显示路径/图像中设置顺序(Set order on displaying paths/images

2019-08-17 06:33发布

我有一个一对夫妇弧和rects的UIView ,和UIImageView为好。 我想有UIImageView背景。 我在IB下令,使图像的观点是我的标签和按钮的后面。

首先,我需要把图像中的图像视图,这是我不希望在IB做。 我试过这个代码

UIImage *myImage = [UIImage imageNamed:@"image.png"];
UIImageView *myImageView = [[UIImageView alloc] initWithImage:@"myImage"];

但是,这是行不通的。 之后我得到的工作,我能做些什么来移动图像视图前我的路径?

Answer 1:

添加图片到UIImageView

UIImage *myImage = [UIImage imageNamed:@"image.png"];
UIImageView *myImageView = [[UIImageView alloc] initWithImage:myImage];
[self.view addSubview:myImageView];


Answer 2:

我想你想画把一个背景图像和在它上面要绘制圆(弧)。

如果我的理解是正确的。 第一绘制到使用CGContextDrawImage()视图中的图像,然后绘制在它的上面弧。 (无需使用图像视图)。



文章来源: Set order on displaying paths/images