Navigating SwiftUI with an Enum Router (Cyclical A → B → C Flow) — A Simple example Introduction In this post, we’ll explore a lightweight, type‑safe way to manage navigation in SwiftUI by modelling screens as an enum and driving transitions with closures. We’ll illustrate a simple cyclical flow through three views—A → B → C → A—and then dive into the pros and cons of this approach.
1. Defining the Router State First, we define an enum with three cases—one for each screen.
Want to make your SwiftUI views more reusable, composable, and clean?
This post explores how to build your own generic containers using Swift’s type system and SwiftUI’s powerful @ViewBuilder + closure patterns.
Whether you’re building custom layouts, DSL-like preview wrappers, or logic-driven composition — understanding generic containers is a key unlock.
💡 SwiftUI Tip: Wrapping Views with Generics and Closures I recently hit a situation in SwiftUI that seemed small at first — but led to a mini “aha!
I’m a total fan of immutable Operating System. the peace of mind, stability, and consistency they provide is invaluable but getting started can be a bit difficult, specially if you’re coming for more traditional operating systems (mutable ones).
With this post I aim to show my current workflow working on Fedora Silverblue, I am by no means an expert on Fedora SilverBlue. I want to share the way I use these systems and I hope to helps other by sharing my current understanding and workflows.
Introduction Hey everyone, I’m back with a new entry. This time, I’d like to guide you on how to create a simple hello world program for the ESP32-C6 inside a Virtual Machine.
Having all the toolchain inside a VM is a great way to unclutter your host machine. Programming inside a VM or containers for web development is quite common, but for microcontrollers, it’s a thing I don’t encounter that often.
ARM processors are becoming more ubiquitous thanks to the introduction of Apple Silicon and Qualcomm Snapdragon. These new processors offer great performance, silent operation, and all-day battery life. On the other hand, not all software is ported to this new architecture, so there could be cases when we need to run or program x86_64 devices.
To solve this problem, we have several tools at our disposal. In this post, let’s explore one solution to emulate and run x86_64 software.
Welcome to another installment of UIKit Learning! Today, we will dive into UICollectionView and explore how to use it effectively in your iOS apps.
A UICollectionView is a versatile and powerful component in UIKit that allows you to present a grid or list of items in a highly customizable layout. Whether you need a simple grid of images, a complex layout with multiple sections and headers, or dynamic, animated updates, UICollectionView provides the flexibility to create engaging user interfaces.
In some projects, you might not want to use Storyboards or XIBs for various reasons, such as greater flexibility and control over your views, better version control, or simply personal preference. If that’s your case, this post will guide you through the basic steps to configure a Storyboard project to work with UIKit programmatically.
Step-by-Step Guide I’m using Xcode 15.4, the graphical user interface (GUI) may change in the future causing some images to be outdated or some steps to be different.
Tabs bars are one the most recognizable UI elements for an iOS apps. We can find this element in build in apps like Phone, Photos, Music, AppStore, and many more.
Lucky for us, this element is quite easy to use, and in this tutorial, we’ll learn how to create a tab bar programmatically using UIKit. Let’s start!
Simple example Let’s start by configuring our project to allow us to instantiate our views programmatically.
VSCode + Dev Containers are a great way to create custom environments without modifying our actual system.
They provide a consistent development environment, ensure dependencies are managed correctly, and make it easy to share setups with your team.
Here are some configurations you can use to create them.
Vapor { "name": "Swift", "image": "swift:latest", "features": { "ghcr.io/devcontainers/features/common-utils:2": { "installZsh": "false", "username": "vscode", "userUid": "1000", "userGid": "1000", "upgradePackages": "false" }, "ghcr.io/devcontainers/features/git:1": { "version": "os-provided", "ppa": "false" } }, "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ], "customizations": { "vscode": { "settings": { "lldb.
Lately, I’ve been writing a lot about UIKit and I noticed I haven’t covered the delegate pattern.
This pattern is not exclusive to UIKit but it’s quite used in this framework.
In this post, we’ll dive into the Delegation Pattern, a fundamental design pattern in iOS development that helps in creating a well-structured codebase.
What is the Delegation Pattern? The Delegation Pattern is a design pattern where one object (the delegator) hands off (or delegates) some of its responsibilities to another object (the delegate).