Last active
August 29, 2015 14:06
-
-
Save morizotter/62f94cf48880a02d979c to your computer and use it in GitHub Desktop.
CGFloatの小数点第一位までを文字列として取り出す ref: http://qiita.com/morizotter/items/99acda6bef59971af73a
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let someCGFloat: CGFloat = 0.25 | |
| var text = String(format: "%.01f", Float(someCGFloat)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment