There’s already a radar filed for this (I don’t know if there’s a JIRA bug
though).
The problem is that the standard library’s reflection mechanism only knows how
to map the in-memory representation of an enum to a case name for native Swift
enums. Objective-C enums are represented by their
> On 17 Jul 2017, at 15:15, Michael Rogers via swift-users
> wrote:
>
> Hi, All:
>
> Can someone please enlighten me as to why the first enum works as expected,
> giving me Melbourne, but the second gives UIModalPresentationStyle rather
> than fullScreen?
Sure - it's
Certain Objective-C enums don’t print a useful debug description. I
usually work around this by implementing CustomStringConvertible (or the debug
version) for the type myself. You probably want to file a bug with Apple.
Jon
> On Jul 17, 2017, at 6:15 PM, Michael Rogers via
Hi, All:
Can someone please enlighten me as to why the first enum works as expected,
giving me Melbourne, but the second gives UIModalPresentationStyle rather than
fullScreen?
enum City {
case Melbourne, Chelyabinsk, Bursa
}
let city = City.Bursa
print(city)
// prints "Melbourne"
let