WWDC 2016 Spotlight: macOS

Dan Berry
BPXL Craft
Published in
3 min readJun 17, 2016

--

With less than a week to go before WWDC, it was reported by many rumor sites that Mac OS X would be renamed this year to bring it in line with Apple’s other development platforms: iOS, tvOS, and watchOS. This proved true, and the Mac received some great consumer-facing features, several of which can be taken advantage of by developers. Let’s look at a few of the updates in Cocoa this year that developers and designers should be thinking about while creating modern apps.

Tabs

Tabs are now a system-level feature, and taking advantage of them is simple. If you have a document-based app, you get it for free. For other apps that wish to take advantage of the tabs feature, you need to enable the new tab button.

NSControl

Several subclasses of NSControl now have initializers that make them easier to use. For example NSTextField now has labelWithString, and NSImageView now has imageViewWithImage. This will eliminate lots of boilerplate for commonly used elements and allows for consistent behavior with views that use vibrancy.

NSGridView

NSGridView is a new class that makes creating column and row interfaces incredibly easy, and it has some similarities to the way NSStackView works. You can merge cells in the horizontal and vertical direction as well as provide alignment and spacing for rows and columns. This will make things like preference UI much easier to accomplish.

Promise Drags

There are two new protocols for promise drag operations: NSFilePromiseProvider and NSFilePromiseReceiver. Using these provides you with features like drag flocking (changing order and formation in the destination application); they are UTI based and backwards compatible.

NSCollectionView

NSCollectionView gains support for optional floating section headers and footers. You can expand and collapse sections into a single scrollable row as well.

NSStatusItem

Status items get reordering and keyboard navigation between items by default as well as dragging off the status menu to hide an item. For apps that are status bar only, dragging the icon off to hide it can also automatically quit the application and is an opt-in option.

Apple File System

All Apple products currently use some form of HFS+, a format that has been around for over 30 years. It was designed back when floppy disks were cutting-edge technology. Now, with Apple File System (APFS), Apple has crafted a file system designed with flash and SSD storage in mind and encryption as a primary feature. Also, it will scale from the Apple Watch to the Mac Pro. Two of the features that caught our attention were snapshots and file/directory cloning. APFS will be coming to the Mac in the fall and other Apple platforms in 2017.

Core Data Implementation

Last but not least, in macOS Sierra, NSFetchedResultsController is now available for Cocoa apps, making it easier to have a similar Core Data implementation between platforms.

While this wasn’t a year where a ton of new features were introduced in Cocoa, it did bring a lot of refinement and quality-of-life enhancements. We’re excited to leverage these features in our apps and hope you are as well.

Check out these resources to learn more:

For more insights on design and development, subscribe to BPXL Craft and follow Black Pixel on Twitter.

--

--