I'm developing an app with Swift and SpriteKit. I've converted my code from Swift 2.3 to Swift 3, but when I run the code I get the following error:
Thread 1:EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP.subcode=0x0)
The error show up on this line. I've created okLabel
with SKLabelNode
.
okLabel.fontName = (text: NSLocalizedString("dialogOKFont", comment: "")) as! String
On Localizable.strings(Base)
, I've defined "dialogOKFont"
as follows:
"dialogOKFont" = "Optima-Bold";
I really appreciate if someone gives me an answer or hint to fix this error. Thank you in advance.