View profile

Styling SwiftUI List Views - Not Only Swift Weekly Issue #5

Peter Friese
Peter Friese
Hello!
I’ve just finished recording a video about Firebase Authentication on the web using the latest version of the Firebase JavaScript SDK, and it is quite interesting to see how different programming languages implement concepts like async/await.
For example, would you be able to tell if the following code snippet is written in JavaScript or Swift?

Swift or JavaScript?
Swift or JavaScript?
You probably guessed it - this is a piece of code from the sample app for the video, written in JavaScript, but it could just as well be valid Swift code. In fact, a JavaScript linter would probably scold me for not using ; at the end of each statement…
The evolution of Swift and JavaScript couldn’t be more different, though - JavaScript is a language that has to walk a fine line of browser compatibility, whereas early versions of Swift seemed to follow the principle of “move fast, and break things”. You can still painfully see the results of this process when looking as StackOverflow answers that provide solutions for several versions of Swift, because of slight differences between language versions.
I am happy Swift has reached a state of relative stability now, while still being able to add new concepts such as async/await.
I hope you enjoy this fifth edition of Not Only Swift Weekly - if you do, please share it with a friend. And as always, feel free to share your feedback with me!
Thanks for reading!
Peter
What I am working on
After previously looking at how to create static and dynamic List views, this episode in The Ultimate Guide to SwiftUI List Views provides an overview of all the different ways you can style List views and their rows. When I started iOS development, building list views (based on UITableView required lots of boilerplate code, and you had to work hard to make your code perform well. All of this has become so much easier with SwiftUI. Check out the article:
Swift
Back-deploying Concurrency
The Swift team (and Doug Gregor in particular) seems to be putting some serious amount of work into making back-deployment of async/await a reality. Adding an option to build the concurrency library for back-deployment was one of the first PRs people noticed, and Back-deploy concurrency is another step to make this happen. Doug provides some context in this thread: “we’re not ready to commit to an answer to [whether concurrency will be back deployed to older OSes] because, as we said before, it’s technically challenging and we’re not 100% sure it’ll work out.”
If you’re interested in this, follow along on GitHub at https://github.com/apple/swift
I am stoked to be speaking at SwiftLeeds (October 7th, in Leeds), alongside Antoine van der Lee, Josh Holtz, Danijela Vrzan, Tim Condon, Jordi Bruin, and Donny Wals. I’ve been told there are still a couple of tickets left (at 150 GBP), but you need to be quick: sale closes on September 30th!
SwiftUI
If you’ve been following along my YouTube series Building SwiftUI Components, you will be aware of the power of SwiftIU’s environment. In this new article series, Federico Zanetello dives into how this all works under the hood. If Frederico’s previous articles are anything to go by, this will be a stellar series you don’t want to miss!
Combine
Combine is a very powerful framework, but if you’re not coming from a functional background, the learning curve is pretty steep. Here is JC Pastant (@pjechris) with some pretty useful tips & tricks that will make your Combine code better (and more error-free!).
One of the first books about Combine has just been updated to cover the most recent versions of iOS, Swift, and Xcode. This is a great book, and if you want to understand Combine, this is one of the go-to resources.
Firebase 🔥 / Cloud 🌥
Firebase Summit
We’ve been busy these past few weeks preparing for Firebase Summit 2021, and I am thrilled to say the main event will take place on November 10th. We’ve got a few surprises up our sleeves, so keep your eyes peeled!
Tools
Create text-based diagrams for your README
Did you ever wish there was an easy way to add diagrams to your README or other text-based documents? Check out ASCIIFlow.
This is a great collection of tools and frameworks to help you solve problems, make decisions, and understand systems. Next time you’re stuck, trying to figure out why something does or doesn’t work, check out this resource.
On Repeat
The Shapeshifters featuring Kimberly Davis - Life Is A Dancefloor
The Shapeshifters featuring Kimberly Davis - Life Is A Dancefloor
Did you enjoy this issue? Yes No
Peter Friese
Peter Friese @peterfriese

Xcode tips & tricks, Swift, SwiftUI, Combine, Firebase, computing and internet history, and - of course - some fun stuff.

In order to unsubscribe, click here.
If you were forwarded this newsletter and you like it, you can subscribe here.
Created with Revue by Twitter.