LAST CHANCE: Save 50% on all my Swift books and bundles! >>

What new Swift API would you most want to see in your projects?

Recorded – watch the full episode on YouTube.

Is there any new Swift API you would like to incorporate into your work at New York Times?

Paola Mata: So something I'm thinking about now for a project that I'm working on is using diffable data sources.

Paul Hudson: Oh, yeah. Steve Breen’s work – so good!

Paola Mata: I haven't used it yet. And I think it'd be great because I'm running into a situation where we have a list, we're thinking a lot about making it editable. And I've been told that it would be a really good use case for it.

It can suck not being able to dive right into these things because they do have to support older versions. But I do keep an eye out for where can I make a case for using this new API or using this new feature.

“Diffable data sources do that for you. You just say, ‘here's my old data, here's the new one. Figure out the differences, please apply a snapshot,’ and boom, it'll reorder them animated live on the thing.”

Paul Hudson: It's a wonderful feature. And the example they gave actually on the WWDC stage was re-implementing the WiFi finder in iOS, where you see a few WiFi things, your local hotspot and new ones slide in and then go away again. So you'll just call out with the old ones, whatever. And it's constantly changing the list. You want to animate it and move around and go away again.

That kind of thing is difficult to do because you want to animate it nicely. You want the list to move up slightly and then reorder and insert here. And of course you can just call and we load data, but we don't want to do that one and make it nice and beautiful. Well, diffable data sources do that for you. You just say, “here's my old data, here's the new one. Figure out the differences, please apply a snapshot," and boom, it'll reorder them animated live on the thing. It just looks absolutely fantastic. So that's a good choice.

Paola Mata: Yes, I'm excited to get into it.

This transcript was recorded as part of Swiftly Speaking. You can watch the full original episode on YouTube, or subscribe to the audio version on Apple Podcasts.

Listen on Apple Podcasts

Hacking with Swift is sponsored by Essential Developer.

SPONSORED Join a FREE crash course for mid/senior iOS devs who want to achieve an expert level of technical and practical skills – it’s the fast track to being a complete senior developer! Hurry up because it'll be available only until July 28th.

Click to save your free spot now

Sponsor Hacking with Swift and reach the world's largest Swift community!

Buy Pro Swift Buy Pro SwiftUI Buy Swift Design Patterns Buy Testing Swift Buy Hacking with iOS Buy Swift Coding Challenges Buy Swift on Sundays Volume One Buy Server-Side Swift Buy Advanced iOS Volume One Buy Advanced iOS Volume Two Buy Advanced iOS Volume Three Buy Hacking with watchOS Buy Hacking with tvOS Buy Hacking with macOS Buy Dive Into SpriteKit Buy Swift in Sixty Seconds Buy Objective-C for Swift Developers Buy Beyond Code

Was this page useful? Let us know!

Unknown user

You are not logged in

Log in or create account

Link copied to your pasteboard.