<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div><blockquote type="cite" class=""><div class="">On 17 Jul 2017, at 15:15, Michael Rogers via swift-users &lt;<a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi, All:<div class=""><br class=""></div><div class="">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?</div></div></div></blockquote><div><br class=""></div>Sure - it's because it's an alias that is imported via Objective-C rather than defined in Swift:</div><div><br class=""></div><div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">typedef NS_ENUM(NSInteger, UIModalPresentationStyle) {</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; UIModalPresentationFullScreen = 0,</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; UIModalPresentationPageSheet NS_ENUM_AVAILABLE_IOS(3_2) __TVOS_PROHIBITED,</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; UIModalPresentationFormSheet NS_ENUM_AVAILABLE_IOS(3_2) __TVOS_PROHIBITED,</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; UIModalPresentationCurrentContext NS_ENUM_AVAILABLE_IOS(3_2),</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; UIModalPresentationCustom NS_ENUM_AVAILABLE_IOS(7_0),</span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div></div><div>(you can see this in the UIViewController.h file in the UIKit, which is found underneath your Xcode install)</div><div><br class=""></div><div>The importer notes that the name of such typedef'd constants effectively become translated into an enum as far as Swift source code is concerned, but it's a different kind of case.</div><div><br class=""></div><div>Having said that, it might be a bug in the case that the description of the constant isn't the name of the element type. It would be worth raising this on <a href="http://bugs.swift.org" class="">bugs.swift.org</a> and use this example in case there's something that can be done to fix it.</div><div><br class=""></div><div>Alex</div><br class=""></body></html>