swift - custom number formatter with currency symbol -
i have text field user should enter price. on text field dragged custom number formatter settings:
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
Comments
Post a Comment