O'Reilly logo

Swift Programming: The Big Nerd Ranch Guide by John Gallagher, Matthew Mathias

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

26 Your First Cocoa Application

One of Swift’s most compelling features is its ability to interact with Objective-C, the language in which Mac and iOS apps have traditionally been written. We are not going to cover the full story of how the two languages live side by side in one app, but the next three chapters will give you a taste. Swift makes it possible to use Objective-C libraries like Cocoa, the native API for developing desktop Mac apps.

Swift is able to talk to Cocoa (and other Objective-C frameworks) using techniques broadly described as bridging. Bridging is the process by which a function or instance in one language can be called from or given to the other language. Bridging goes in both directions: Swift can call Objective-C ...

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