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