How to convert NSNumber to String in Swift4?

Dhanush Kumar S picture Dhanush Kumar S · May 23, 2018 · Viewed 14.7k times · Source

How to convert an Array of NSNumber to Array of String in order to display the value in UITableView?

cell.textlabel.text = ?

Code:

var a = [68.208983, 6.373902, 1.34085, 3.974012, 110.484001, 
         61.380001, 1.325202, 0.8501030000000001, 0.8501030000000001, 
         0.8501030000000001, 3.647296, 1.28503]

Answer

Aviram Netanel picture Aviram Netanel · Aug 22, 2018

just add

.stringValue

to your NSNumber variable