28
28

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Swift2.0でNSCalendarを使う

Last updated at Posted at 2015-09-17

いままで

let dataComps = calendar.components(.NSYearCalendarUnit|.NSWeekOfMonthCalendarUnit|.NSWeekdayCalendarUnit, fromDate: startDate)

こうだったのが

swift2.0

let dataComps = calendar.components([.Year, .Month, .Day], fromDate: startDate)

こうなりました。
OptionSetTypeによって、文法が変わったことによる影響です。

28
28
0

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
28
28

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?