Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已经使用 nib 进行了查看并在其上插入了滚动视图。然后我使用 imageview 动态添加了一个图像。现在我应该怎么做才能在该图像上填充颜色。
你之后的事情不是很清楚,
如果要使整个图像成为单一颜色,请删除图像并设置.backgroundColor.
.backgroundColor
如果您的图像具有一定的透明度,您可以通过上述相同的方法将透明颜色设置为单一颜色。
背景颜色也可以在笔尖中设置;(选择 imageView,转到 Inspector 窗口,第一个选项卡)
如果您想为图像中的形状着色,那是完全不同的事情。