textAttributesForNegativeValues
負の数のテキスト属性の辞書(NSDictionary)を返します
解説
負の数のテキスト属性の辞書(NSDictionary)を返します。
カラーはセルがフォーカスされていないときしか変わりません。
セルにフォーカスがあるときは黒で表示されます。
返り値
( NSDictionary * )
負の数の文字属性辞書
引数
フレームワーク
Foundation
クラス
NSNumberFormatter
Instance Methods
使用可能
10.0
参照
- setTextAttributesForNegativeValues:
例文
#import "MyObject.h" @implementation MyObject - (IBAction)myAction:(id)sender { NSNumberFormatter *numFormat = [[[NSNumberFormatter alloc] init] autorelease] ; [numFormat setFormat:@"#,##0.00;[Red]-#,##0.00"]; [[myOutlet cell] setFormatter:numFormat]; NSLog([[[[myOutlet cell] formatter] textAttributesForNegativeValues] description]); } @end