阿拉伯数字转换为汉字

其实很简单其实就是用NSNumberFormatter来做格式化就好了如下

NSNumberFormatter *formatter = [NSNumberFormatter new];
formatter.numberStyle = kCFNumberFormatterRoundHalfDown;
[formatter stringFromNumber:[NSNumber numberWithLong:将要转换阿拉伯数字]]

说点什么

avatar
  Subscribe  
提醒