SKShapeNode filltexture() does not display image

心已入冬 提交于 2019-12-05 08:23:15

The documentation states

The default value is nil. If a fill texture is specified, the fillColor property is ignored and the filled portion of the shape node is rendered using the texture instead [emphasis added].

This suggests that the shape must be filled or the texture will not be visible; therefore, if you set the shape's fill color with

circle.fillColor = .white

the texture will appear. You can also set fillColor with a different color to colorize the texture:

circle.fillColor = .blue
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!