TN3108: Viewing the interface of your Swift code
Learn how to navigate to the interface file of a Swift implementation file.
Overview
Xcode generates an interface file that includes all your source code’s internal and public declarations when using the Assistant editor, the Related Items, or the Navigate menu.
Using the assistant editor
In the project navigator, select your implementation file.
Choose Editor > Assistant.
The generated interface for your Swift code appears in the assistant editor on the right. [Image]
Using the Related Items button
In the project navigator, select your implementation file.
Click the Related Items icon in the editor’s jump bar.
In the menu that appears, choose Counterparts > [Filename] to view your interface file. [Image]
Alternatively, choose Generated Interface > [Filename] from the menu.
To navigate back to your implementation file, choose Original Source from the menu. [Image]
Using the Navigate menu
In the project navigator, select your implementation file, then choose Navigate > Jump to Next Counterpart to view the interface file. [Image]
To navigate back to your implementation file, choose Navigate > Jump to Previous Counterpart or Navigate > Jump to Original Source [Filename]. [Image]
Revision History
2022-05-24 Made minor editorial changes.
2022-02-08 Republished as TN3108 with significant editorial changes.
2016-03-23 First published as QA1914.
See Also
Latest
TN3205: Low-latency communication with RDMA over ThunderboltTN3206: Updating Apple Pay certificatesTN3179: Understanding local network privacyTN3190: USB audio device design considerationsTN3194: Handling account deletions and revoking tokens for Sign in with AppleTN3193: Managing the on-device foundation model’s context windowTN3115: Bluetooth State Restoration app relaunch rulesTN3192: Migrating your iPad app from the deprecated UIRequiresFullScreen keyTN3151: Choosing the right networking APITN3111: iOS Wi-Fi API overviewTN3191: IMAP extensions supported by Mail for iOS, iPadOS, and visionOSTN3134: Network Extension provider deploymentTN3189: Managing Mail background traffic loadTN3187: Migrating to the UIKit scene-based life cycleTN3188: Troubleshooting In-App Purchases availability in the App Store