2009-12-30 37 views

回答

30

你可以試試:

[NSString stringWithFormat: @"%.2f", myFloat]; 
+1

我覺得應該有[的NSString stringWithFormat: 「%2F」 @,myFloat]。爲浮動。 – 2009-12-30 05:25:33

+0

你完全正確,我編輯了我的答案,對不起,錯字。 – 2009-12-30 14:10:27

0

托盤這迅速

var a = String (stringInterpolationSegment:myFloat) 
相關問題