iosswiftdevicesklabelnodecolor-blending

Why colorBlendFactor does not affect 'SKLabelNode' on my device in Swift?


I'm trying to change color on SKLabelNode in my project.

When I run the project on iPhone 5s with iOS 11.1.2 the SKLabelNode have the correct color, but when I run the project on iPad with iOS 9.3.5 the SKLabelNode appears in white.

Here is how I color the label:

roundLabel.colorBlendFactor = 1.0 roundLabel.color = UIColor.red

** on iPad Pro simulator the color is correct.


Solution

  • Coloring the .fontColor instead of the .color solved the problem!

    roundLabel.fontColor = UIColor.red

    works!