0 votes
235 views
asked in Swift by (8.2k points)
hi

  How to covert Int,Float to String in Swift?

1 Answer

0 votes
answered by (3.1k points)

Hi

  Just get the "Descreption" for the variable it will give String value for the specific variabel

EX:

  var title:NSString = NSString()

    var rating = Float()

title = rating.description

commented by (3.1k points)
We can use this also
String.localizedStringWithFormat("%.2f", rating)

Categories

...