It's really going crazy, this single simple line doesn't compile, why?
I'm using Xcode Version 8.1 (8B62)
Here's the api reference for String(format: String, _ arguments: CVarArg...)
It's really going crazy, this single simple line doesn't compile, why?
I'm using Xcode Version 8.1 (8B62)
Here's the api reference for String(format: String, _ arguments: CVarArg...)
It's really embarrassing to find that String(format: String, _ arguments: CVarArg...)
is part of Foundation
and not an default constructor....
The solution is that put import Foundation
on the top of the playground
Add
import Foundation
to the top of your playground.This will import the Foundation Framework and will allow you to use its API.