Viewing the interface of your Swift code
Q: How do I view the interface of my Swift code in Xcode?
A: Xcode generates an interface file that includes all your source code's internal and public declarations when using the Assistant editor button, the Navigate menu, or the Generated Interface feature.
Using the Assistant editor button
Select your Swift file in the project navigator.
Click the Assistant editor button in the Xcode toolbar as shown in Figure 1.
Xcode automatically shows the generated interface for your Swift code in its Assistant editor pane using the Counterparts mode as shown in Figure 2.
Using the Navigate menu
Select your Swift file in the project navigator.
Choose Navigate > Jump to Generated Interface as shown in Figure 3 to view your code's interface.
Using the Generated Interface feature
Select your Swift file in the project navigator.
Click the related items button in the editor's jump bar.
Xcode displays a contextual menu. Choose Generated Interface as shown in Figure 5 to view your code's interface.
Document Revision History
Date | Notes |
---|---|
2016-03-23 | New document that describes how to view the interface of your Swift code. |
Copyright © 2016 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2016-03-23