0
Is there a way to pass a float from one variable to another variable of type string?
I need to display some values in an iPhone app. These values have looong names and I have to make them part of a text to be placed in aa text field. How?
5 Answers
+ 3
typecasting perhaps?
+ 1
Unfortunately, I'm not familiar with Swift syntax.
But I hope this helps
https://medium.com/@abhimuralidharan/typecastinginswift-1bafacd39c99
+ 1
Idk swift either, but I saw somewhere that you can do:
text = String(format: "a float number: %.5f", 1.0321);
I don't have where to test it though.
0
Exactly so how is typecasting done in Swift?
0
Thanks will try that