Reputation: 4270
After opening my project up in Xcode 7, one of the more surprising changes I had to make was changing enum/struct code (I originally only mentioned enums in this post but apparently NSCalendarUnit
is an enum in Obj-C and a struct in Swift -- what's up with that?) like NSCalendarUnit.CalendarUnitMonth
to NSCalendarUnit.NSMonthCalendarUnit
. I'm perfectly able to make such changes, obviously. Yet I want to know why?
Upvotes: 0
Views: 125
Reputation: 12800
That's the new OptionSetType that replaces the binary operations you used to have to do when Objective-C NS_OPTION
enums were imported into Swift.
Upvotes: 1