Chapter 19
Mixing Objective-C and Swift
In This Chapter
Comparing frameworks in Objective-C and Swift
Calling an Objective-C method in Swift
As this book is written in the beginning of 2015, the topic of mixing Objective-C and Swift isn’t an if: it’s a now (and, in this chapter, a how). The Cocoa and Cocoa Touch frameworks are written in Objective-C and have been since the first days of NeXTSTEP (and later OpenStep and still later Rhapsody; later still OS X and Cocoa, even later yet iPhone OS, and, most recently, iOS and Cocoa Touch). This is quite a long run for a programming language, but the languages of proven value in supporting operating systems do tend to stick around for a while. (These languages include Objective-C with the versions of our operating system just listed as well as C with UNIX and its offshoots.)
They stick around for several reasons — starting with the fact that they work. People have learned to work with them over the years, and they have proven (both the people and the languages) to be able to handle the problems that are thrown at them.
Additionally, these languages are the building blocks of major operating systems, but they’re also the building blocks of many application programs. When used to build operating systems, languages like C and Objective-C ...
Get Swift For Dummies now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.