attributedStringForZero
ゼロの値を表示する属性付き文字列を返します
解説
ゼロの値を表示する属性付き文字列を返します。
返り値
( NSAttributedString * )
ゼロを表す属性付き文字列
引数
フレームワーク
Foundation
クラス
NSNumberFormatter
Instance Methods
使用可能
10.0
参照
- setAttributedStringForZero:
例文
#import "MyObject.h" @implementation MyObject - (IBAction)myAction:(id)sender { NSNumberFormatter *numFormat = [[[NSNumberFormatter alloc] init] autorelease] ; [numFormat setNegativeFormat:@"-#,##0.00"]; [myOutlet setFormatter:numFormat]; NSLog([[[myOutlet formatter] attributedStringForZero] string]); } @end