Every year SwiftUI improves and gets new modifiers that widen the capabilities of the framework. Sadly, as responsible developers, we can’t use any of that because our users take some time to update and, as opposed to the Android ecosystem where Jetpack Compose is just a library embedded in every app, we need to wait for our users to be at the required minimum OS version to enjoy those fancy new tools.
Today I spent a couple of hours understanding how SwiftUIaspectRatio modifiers works and how it interacts with Image. It’s a surprisingly simple system, but also one that made me wonder why things worked the way they worked.
Today I want to share a weekend experiment where I built the classic Matrix effect in SwiftUI. It all started after seeing this tweet of the effect implemented in Compose. I immediately wondered what would it take me to build that in SwiftUI, so when I had some spare time in a weekend I gave it a go.
We’re just in the week of WWDC and it’s clear that Swift’s Concurrency it’s the biggest topic that will change how we develop. I’ve been following its evolution for months now and I’m happy to see how Apple talks about it on their sessions, it helps us see how much they really believe in this new langauge feature.
SwiftUI’s layout system is very nice to get started with. Combining stacks and modifiers you can get very far very quickly, but at some point you will need to pass information up the view hierarchy. Thankfully SwiftUI has a solution for that: preferences.
When Apple released its own SwiftUI tutorial I decided to give it a try. This was not a simple tutorial introducing the basics of SwiftUI, but a more overarching training to know how to create a real application in SwiftUI. From custom UI to sharing data between and interacting with frameworks.
In this post I want to show you a little behind the curtain. As you may have noticed if you follow me on Twitter, recently the tweets with links to this post got a little fancier. What you may not know is that these images are generated using SwiftUI.
One of the major benefits of SwiftUI is its amazing DSL. A feature that not only makes it nice to read but also makes it possible to use the type system to unlock tremendous performance benefits. AnyView is a view that defies all of this, and although useful in very specific circumstances, you should always try to use a better alternative.
SwiftUI is an amazing tool to create all sorts of views in our applications. But many times we want that ease of use to generate graphics that can be used outside of apps, usually as simple image files. That’s why is so useful to know how to generate images from SwiftUI views. This power unlocks a new world of possibilities!
The introduction of SwiftUI and previews changed completely my process of developing applications. Having such an easy way of quickly prototyping UI ideas affected the rest of my process. But as much as I love Xcode previews, they are not perfect. In this post I want to share with you a small trick that can improve a lot your iteration cycles.
PointFreehas released a library with their Composable Architecture and I’ve been showing it a little bit on livestreams and videos. This page wants to serve as an index and a summary for this content.
One of the common things we want to display with SwiftUI are lists of our models. The basics of it are pretty easy, you just need to use a ForEach view.
SwiftUI has some presentation modifiers to display alerts, sheets and full screen views. On one hand, presenting an alert is nice and easy, it feels really well designed. But on the other hand presenting a modal screen (or action sheets or popovers) is too cumbersome.
In my previous post about SwiftUI buttons I described a technique to reuse button configuration with a ViewModifier. Now that beta 2 is out, we finally have the proper tools to reuse styles in a much better way!
Yesterday I shared with you a post where I was trying to understand SwiftUI’s layout system in order to implement equally spaced distribution for views inside stacks.
The abstractions on SwiftUI are so composable that customising the UI it’s basically an intrinsic property of the framework. Let’s take a quick look at some things you can do with Button.
WWDC’19 has been great and I’m obviously hyper excited about SwiftUI but if there is one thing that I like more than watching a great announcement is watching great video content, and the WWDC sessions are the best!
WWDC ’19 is over, and what a week! Let me start by saying that this is probably the best WWDC ever. We have seen the announcement of game changing technologies for the Apple developer community, but even ignoring those big announcements, the rest of smaller details make on itself a great WWDC.