O'Reilly logo

Mastering Swift 4 - Fourth Edition by Jon Hoffman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding Swift files to the Objective-C project

Let's begin by creating the Swift MessageBuilder class. This class will be used to build the personalized message for the user. Within Objective-C projects, I usually create a separate group called SwiftFiles to hold the Swift files in. This allows me to very easily see which files are written in Swift and which files are written in Objective-C. To add a Swift file to our project, right-click on the group icon that we want to add the file to and we should see the following menu:

From this menu, select the New File... option. This option will walk us through creating a new file for our project. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required