This Week...

NSScanner

Being able to pull apart strings and extract particular bits of data is a powerful skill, one that we use over and over building apps and shaping our tools. Cocoa provides a powerful set of frameworks to handle string processing. This week's article focuses on NSScanner, a highly configurable tool designed for extracting substrings and numeric values from loosely demarcated strings.

Continue Reading

Recent Articles

Swift Collection Protocols

Swift's collection protocols act like the steps on a ladder. With each step up, a collection type gains more functionality within the language and the standard library. This week we'll explore these protocols: what they are, how to conform to them, and what benefits they can provide for your own custom collection types.

Swift 1.2

Swift, true to its name, is moving fast. With the beta release of Swift 1.2, the Swift team has responded to so many of the community's requests in one fell swoop, we're overflowing with new and exciting features. This week, take a look at two major aspects of the release that will significantly improve the experience of working in Swift: first, big changes in if let optional binding, and second, new access to nullability annotations in Objective-C.

IBInspectable / IBDesignable

Replacing an interface that requires us to memorize and type with one we can see and manipulate can be a enormous improvement. With IBInspectable and IBDesignable, Xcode 6 makes just such a substitution, building new interactions on top of old technologies.

Swift & the Objective-C Runtime

Even when written without a single line of Objective-C code, every Swift app executes inside the Objective-C runtime, opening up a world of dynamic dispatch and associated runtime manipulation. To be sure, this may not always be the case—Swift-only frameworks, whenever they come, may lead to a Swift-only runtime. But as long as the Objective-C runtime is with us, let's use it to its fullest potential.

Java​Script​Core

Introduced with OS X Mavericks and iOS 7, the JavaScriptCore framework puts an Objective-C wrapper around WebKit's JavaScript engine, providing easy, fast, and safe access to the world's most prevalent language. Love it or hate it, JavaScript's ubiquity has led to an explosion of developers, tools, and resources along with ultra-fast virtual machines like the one built into OS X and iOS.

Long Live Cocoa

Swift is an exciting language for many of us, but it's still brand new. The stability of Objective-C and the history and strength of Cocoa mean that Swift isn't ready to be the driving force behind a major change, at least not quite yet. Cocoa's depth and the power it affords, along with the way it and Swift go hand in hand, make Cocoa as relevant and as promising as ever.

Publications

NSHipster: Obscure Topics in Cocoa & Objective-C
19.99
CFHipsterRef: Low-Level Programming on iOS & OS X
29.99
The NSHipster Fake Book (Objective-C)
19.99

Contributors