Included in plans:
In most cases, the converter maintains the original order of declarations.
However, sometimes we need to make an exception for static methods, global variables, and constants: the converter moves such declarations to the top of the file, to place them outside of a class declaration.
Disabling this option allows maintaining the exact original order of all declarations.
If your Objective-C code is extensively using
#if/#else/#endifdirectives (like the tricky case demonstrated below) then disabling this option may lead to better results.
Original Objective-C code:
Converted Swift code with this Option turned on:
Converted Swift code with this option turned off:
To toggle this feature open Preferences (⌘+,) => Converter and toggle the corresponding checkbox: