Search code examples
xcodeswiftswift-extensions

Swift: Viewing full class API including extensions


How can you view the full API for a class including any defined extensions?

If you open the class in Xcode and view the method list in the quick jump bar it doesn't include any methods defined in any existing extensions for that class.

Ie: You define class A, then someone on your team creates an extension on class A with some additional methods. How can you easily see all the methods now defined on class A including those in the extension.


Solution

  • I would say offhand that there's no good way to do it. You'd think that the Symbol Navigator would be the way, but it seems to know nothing of Swift extensions (as opposed to Objective-C categories, which it does know about). Being created entirely with the Objective-C family of languages in mind, Xcode has not yet caught up with the existence and nature of Swift.