Just to clarify this, as someone has already said, Swift is the name of the virtual module for the runtime, each object, type and language embedded in it will also be available from this namespace.
In this case, why is the type declared as Swift.AnyClass instead of a simple AnyClass ?
I do not think this time it was necessary to avoid a collision of names with a specific type defined in the UITableView scope. This may be due to the fact that UIKit is still written in Objective-C.
They probably used a βworkaroundβ to use the more beautiful AnyClass type in the prototype of this function, which, as defined by the Swift runtime, would not normally be available in Objective-C as a global typedef.
I assume that they manually imported the Swift module (or a smaller layout module with several definitions) into UIKit, and what you see is the result of this.
Umberto Raimondi Jan 18 '17 at 10:41 2017-01-18 10:41
source share