In Xcode 6 Beta 4 stroking with SKShapeNode doesn't work anymore

会有一股神秘感。 提交于 2019-12-05 12:19:38
Santa Claus

This is a common issue with Xcode 6 Beta 4 when using the simulator. It renders fine when using an actual device. See this developer forums thread. It is worth noting that the issue is exclusive to stroking in that setting circle.fillColor still fills the circle (or whatever your SKShapeNode is drawing) correctly.

Also keep in mind that when initializing a UIColor with RGB values the RGB values must be between (inclusive) 0.0 and 1.0.

circle.strokeColor = UIColor(red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0);

Or alternatively use the preset:

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