Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个温度值需要在 iOS 中显示给用户,我怎样才能让这个特殊字符显示为 fehrenhiet,即:37°F。
只需将其复制并粘贴到代码中即可。
double temperature = 37.2f; NSString *temperatureString = [NSString stringWithFormat:@"%.1f°F", temperature]; NSLog(@"%@", temperatureString);