一种将汉字转换为拼音的更简单的方法
//直接上代码吧
NSMutableString *string = [@"苹果" mutableCopy];
NSLog(@"Before: %@", string); // Before: 苹果
CFStringTransform((__bridge CFMutableStringRef)string, NULL, kCFStringTransformMandarinLatin, NO);
NSLog(@"After: %@", string); // After: píng guǒ
CFStringTransform((__bridge CFMutableStringRef)string, NULL, kCFStringTransformStripDiacritics, NO);
NSLog(@"Striped: %@", string); // Striped: ping guo