Все вопросы: [nsnumberformatter]

3 вопросов

похожие теги:
0
голосов
1ответов
622 просмотров

Format Integer as Two Places Decimal

I am presenting the user with a field that displays the number keyboard and only want them to be able to enter numbers--no decimals. Since the field is a currency field, however, I want the number to always display with two decimal places. You've probably seen this type of an interface at an ATM....

10
голосов
1ответов
2592 просмотров

Is it a good idea to prefer NSNumberFormatterBehavior10_4 over NSNumberFormatterBehaviorDefault?

I wonder if it would be more secure to rely on a NSNumberFormatterBehavior10_4 instead of default, because default may change arbitrary some day in future, and suddenly the app looks ugly. Or am I wrong with that?

11
голосов
1ответов
12300 просмотров

iPhone NSNumberFormatter setFormat:

Похоже, что метод NSNumberFormatter's для установки пользовательского formatters. setFormat: недоступен на iPhone ... Так это ... вызывает сбой моего приложения: NSNumberFormatter *lengthFormatter = [[NSNumberFormatter alloc] init]; [lengthFormatter setFormatterBehavior:NSNumberFormatterBe...