In Swift, i cant cast Int to String by:
var iString:Int = 100 var strString = String(iString)
But my variable in Int? , there for error:
I like to create small extensions for this:
extension Int { var stringValue:String { return "\(self)" } }
This makes it possible to call optional ints, without having to unwrap and think about nil values:
var string = optionalInt?.stringValue