setNegativeFormat:
負の数の数字フォーマットをセットします
-(void)setNegativeFormat:(NSString *)aFormat:
解説
負の数の数字フォーマットをセットします。
返り値
( void )
なし
引数
( NSString * )aFormat
フォーマット文字列
フレームワーク
Foundation
クラス
NSNumberFormatter
Instance Methods
使用可能
10.0
参照
- negativeFormat
- 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