negativeFormat
負の数の数字フォーマットを返します
解説
負の数の数字フォーマットを返します。
返り値
( NSString * )
負の数を表すフォーマット文字列
引数
フレームワーク
Foundation
クラス
NSNumberFormatter
Instance Methods
使用可能
10.0
参照
- setNegativeFormat:
- setFormat:
例文
#import "MyObject.h" @implementation MyObject - (IBAction)myAction:(id)sender { NSNumberFormatter *numFormat = [[NSNumberFormatter alloc] init] ; [numFormat setNegativeFormat:@"-#,##0.00"]; [myOutlet setFormatter:numFormat]; NSLog([numFormat negativeFormat]); } @end