I just converter project to swift 3 and now I'm having errors with numberformatter
i tried the following and they all don't work anymore
not sure what to do anymore, i looked everywhere and there are no guides for swift 3 number formatter
i tried the following and they all don't work anymore
Code:
let result = 123.456
let numberFormatter: NumberFormatter = NumberFormatter()
numberFormatter.groupingSeparator = ","
numberFormatter.groupingSize = 3
numberFormatter.usesGroupingSeparator = true
numberFormatter.decimalSeparator = "."
numberFormatter.numberStyle = NumberFormatter.Style.decimal
numberFormatter.minimumFractionDigits = 15
let theString: String = numberFormatter.stringFromNumber((result))! // i get error cannot convert value of type double to expected argument type 'NSNumber'
let theString: String = numberFormatter.stringFromNumber((NSNumber(result)))! // changed it to this and i get error "Argument labels '(_:)' do not match any available overloads"
let theString = numberFormatter.stringFromNumber((NSNumber(result)))! // changed it to this with same error
not sure what to do anymore, i looked everywhere and there are no guides for swift 3 number formatter