Jes*_*sse 11 nsstring stringwithformat
我搜索过,找不到这个答案......
如果我有这个,我怎么能让它显示最终的%符号?它只是在我的标签中省略了它.
[NSString stringWithFormat:@"Tries %i%", tries];
Run Code Online (Sandbox Code Playgroud)
Q8i*_*Q8i 28
就我而言,以下是诀窍!
[NSString stringWithFormat:@"Progress: %.2f%%", progress*100]
// progress is float ranging 0.0-1.0,
//and I would like it to print up to 2 decimal point
Run Code Online (Sandbox Code Playgroud)
快乐的编码!
| 归档时间: |
|
| 查看次数: |
8351 次 |
| 最近记录: |