iOS App Development Book/Video Series

General Category => FAQs => Topic started by: kjmcneish on November 12, 2015, 10:25:33 AM

Title: How to Use Xcode 7's New "Generated Interface" Feature
Post by: kjmcneish on November 12, 2015, 10:25:33 AM
Although Swift doesn't have header files as does Objective-C, Xcode 7 provides a "Generated Interface" feature that allows you to view a virtual header file for a class. This is convenient for viewing all the exposed properties and methods of a class.

To access this option, open a code file in Xcode, then in the Code Editor's jump bar, click the "Related Files" button (the button on the far left that contains four small squares) and then select Generated Interface from the popup menu:

(http://iosappsfornonprogrammers.com/images/RelatedFilesMenu.png)

This generates a virtual header file containing all exposed properties and methods:

(http://iosappsfornonprogrammers.com/images/GeneratedInterface.png)

All the best!
Kevin McNeish
Author of Learn to Code in Swift: https://itunes.apple.com/us/book/learn-to-code-in-swift/id942956811?mt=11 (https://itunes.apple.com/us/book/learn-to-code-in-swift/id942956811?mt=11)
Check out our Robot Tic-Tac-Toe app: https://itunes.apple.com/us/app/robot-tic-tac-toe/id990638517?mt=8 (https://itunes.apple.com/us/app/robot-tic-tac-toe/id990638517?mt=8)