Just to clear this out, as someone already said, Swift
is the name of the virtual module for the runtime, every object, type and builtin defined in the language will also be accessible from this namespace.
In this case, why the type is declared as Swift.AnyClass
instead of simply AnyClass
?
I don't think that it was required to avoid name-clashing with some type defined in UITableView scope this time. This could be related to the fact that UIKit is still written in Objective-C.
They likely implemented a "workaround" to use the better-looking AnyClass
type in that function prototype, that being defined in the Swift runtime would not normally be available in Objective-C as a global typedef.
My guess is that they manually imported the Swift module (or a smaller mockup module with just a few definitions) in UIKit and what you see there is the result of that.