I have converted my project to swift 3, and I have a problem with NSNumber that I cannot deal with. Here's my number formatter declaration
let numberFormatter: NumberFormatter = {
let nf = NumberFormatter()
nf.numberStyle = .decimal
nf.minimumFractionDigits = 0
nf.maximumFractionDigits = 1
return nf
}()
and here's place with error. Value is a double, sure that other things ale fine.
Label.text = numberFormatter.string(from: NSNumber(value))
Message from debugger:
Arguments labels '(_:)' do not match any available overloads
Before conversion everything worked. Please help, I cannot find
Try
Label.text = numberFormatter.string(from: NSNumber(value: value))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With