dateStyle
日付スタイルを返します。セット可能な値はConstantsを見てください
解説
日付スタイルを返します。セット可能な値はConstantsを見てください。
返り値
( NSDateFormatterStyle )
なし
引数
フレームワーク
Foundation
クラス
NSDateFormatter
Instance Methods
使用可能
10.4
参照
-setDateStyle:
例文
#import "MyObject.h" @implementation MyObject - (IBAction)myAction:(id)sender { NSDateFormatter *dateFormat = [[NSDateFormatter alloc] initWithDateFormat:@"%B %e, %Y" allowNaturalLanguage:NO]; [myOutlet setFormatter:dateFormat]; switch ([dateFormat dateStyle]) { case NSDateFormatterBehaviorDefault: NSLog(@"NSDateFormatterBehaviorDefault"); break; case NSDateFormatterBehavior10_0: NSLog(@"NSDateFormatterBehavior10_0"); break; case NSDateFormatterBehavior10_4: NSLog(@"NSDateFormatterBehavior10_4"); break; default: NSLog(@"other"); break; } } @end