jeudi 9 février 2017

Swift NSLocalizedString crash

Vote count: 0

When I run this I get a crash:

price.text = String(format: NSLocalizedString("taceprice.price", comment: ""), itemprice)

But if I type it like this:

price.text = String(format: NSLocalizedString("taceprice.price", comment: ""), String(itemprice))

I dont get a crash and it works. But how come I have to cast the price to a string once more since I already have: String(format:

asked 39 secs ago

Let's block ads! (Why?)



Swift NSLocalizedString crash

Aucun commentaire:

Enregistrer un commentaire