Swift Types
Revision as of 21:54, 16 October 2021 by PeterHarding (talk | contribs) (Created page with " =Converting Arrays= <pre> if latitudeAll.count > 0 { let double = NSNumberFormatter().numberFromString(latitudeAll[0])?.doubleValue } </pre> if you want to convert a Do...")
Converting Arrays
if latitudeAll.count > 0 { let double = NSNumberFormatter().numberFromString(latitudeAll[0])?.doubleValue }
if you want to convert a Double Array from String array:
var doubleArray = latitudeAll.map { Double($0) }
Note, doubleArray is type of [Double?]