LoginSignup
0

More than 5 years have passed since last update.

ObjC to Swift : [NSDateFormatter dateStyle]

Last updated at Posted at 2015-05-03

Objective-C

NSDateFormatter * dateFormatter = [[NSDateFormatter alloc] init];

dateFormatter.dateStyle = NSDateFormatterMediumStyle;

Swift

let dateFormatter = NSDateFormatter()

dateFormatter.dateStyle = NSDateFormatterStyle.MediumStyle

or

dateFormatter.dateStyle = .MediumStyle

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0