• Deciding between ‘let’ and ‘var’ for Swift struct properties

    When declaring a Swift property, we use either the let or var keyword depending on whether we want our new property to be read-only once assigned through the enclosing type’s initializer, or whether we want to allow the property to be mutated and re-assigned multiple times. However, that’s not the only difference between using let…

    Read More

  • Podcast: “Responsive and smooth UIs”, with special guest Adam Bell

    Adam Bell returns to the podcast to discuss different techniques and approaches for optimizing UI code, and how to utilize tools like animations in order to build iOS apps that feel fast and responsive. Sponsors NordVPN: Get an exclusive discount on NordVPN’s excellent VPN service, by going to nordvpn.com/sundell. They even have a 30-day money-back…

    Read More

  • Combining opaque return types with primary associated types

    Ever since Swift was first introduced, it’s been very common to need to use type erasure when working with generic protocols — ones that either reference Self within their requirements, or make use of associated types. For example, in earlier versions of Swift, when using Apple’s Combine framework for reactive programming, every time we wanted…

    Read More

  • Podcast: “Swift concurrency in practice”, with special guest Ben Scheirman

    Ben Scheirman returns to the show to discuss how Swift’s built-in concurrency features, such as async/await and tasks, can be used in practice when building apps for Apple’s platforms. Sponsors Essential Developer: Join the iOS Architect Crash Course to accelerate your journey towards becoming a senior developer. It’s 100% free and held entirely online. NordVPN:…

    Read More

  • Podcast: “The evolution of Swift”, with special guest Nick Lockwood

    On this final episode of 2022, Nick Lockwood returns to the show to discuss the overall evolution of Swift and its ecosystem of tools and libraries. How has Swift changed since its original introduction in 2014, how does it compare to other modern programming languages, and how might the language continue to evolve in 2023…

    Read More

  • Observing the content offset of a SwiftUI ScrollView

    When building various kinds of scrollable UIs, it’s very common to want to observe the current scroll position (or content offset, as UIScrollView calls it) in order to trigger layout changes, load additional data when needed, or to perform other kinds of actions depending on what content that the user is currently viewing. However, when…

    Read More

  • SwiftUI views versus modifiers

    One of the most interesting aspects of SwiftUI, at least from an architectural perspective, is how it essentially treats views as data. After all, a SwiftUI view isn’t a direct representation of the pixels that are being rendered on the screen, but rather a description of how a given piece of UI should work, look,…

    Read More

  • Switching between SwiftUI’s HStack and VStack

    SwiftUI’s various stacks are some of the framework’s most fundamental layout tools, and enable us to define groups of views that are aligned either horizontally, vertically, or stacked in terms of depth. When it comes to the horizontal and vertical variants (HStack and VStack), we might sometimes end up in a situation where we want…

    Read More