When the usesGroupingSeparator is set to yes on iOS18, the groupingSize value becomes 3. groupingSize is different from 0 in earlier iOS18 versions. Is it a bug or will the subsequent official version also make relevant adjustments? We need to adapt the app in advance。
let formatter = NumberFormatter()
let temp = NSNumber(floatLiteral: value)
formatter.usesGroupingSeparator = true;
print(formatter.string(from: temp) ?? "","--",formatter.groupingSize)
Print results below:
iOS18 2222222 -- 0
earlier iOS18 2,222,222 -- 3
1
0
1k