swift - custom number formatter with currency symbol -


i have text field user should enter price. on text field dragged custom number formatter settings:

enter image description here

this works perfect have problem "format". @ moment is: .#.##

but have change show automatically correct user currency symbol @ end?

for static solution can change format .#.## .#.## €

if you're looking universal way it, you're interested symbol ¤, responsible currency sign.

so format looking ,#.## ¤

last step check option lenient, otherwise need provide full format in text field.

more details

since osx 10.9 , ios 7 format strings uses patterns the unicode technical standard #35 of version 31.

you can find number format patterns in version here

apple documentation number formatters


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -