> SwiftUI Articles|
Explore Swiftjective-C's SwiftUI coverage across layout, previews, data flow, view composition, accessibility, and the framework details that matter in production.
26 articles tagged SwiftUI
-
Creating custom controls is something that's just flat out fun. But, I believe, there's an objectively right way to do it.
-
The "What's New" view is found all over iOS apps. With SwiftUI, it's very easy to create logic for this type of thing.
-
Xcode Previews can either be your best friend or worst enemy. Here's how to tame expensive data to reuse it across previews to keep things snappy.
-
The readable content guide is the gold standard of width-to-reading ratio. Here's how to recreate the UIKit-only API in SwiftUI.
-
Accessibility settings has several quality-of-life improvements in iOS 18. Here are a few of my favorites.
-
For 2024, my theme is basically to ship. I want a few things out there to hone in on for 2025.
-
Alignment guides are something I didn't really think about much in SwiftUI. Lately, I've seen some compelling examples of how they can be used.
-
With the Observation framework, we depend on `@State` and pass around objects in the environment. However, you may get stuck with how bindings work with them.
-
SwiftUI is tailored towards data that mutates. But, what about when you need to share a lot data that doesn't change - and from Objective-C and UIKit code?
-
In my last snip, I did a mock Threads interface. Here's the code for it.
-
So many new SwiftUI APIs from W.W.D.C. 23. Here's a neat one that I've written myself previously, a modifier for relative frame sizing.
-
How does dependency injection with work StateObject? In fact, should it even work at all?
-
I simply want to make the best apps. I don't want to pick and choose frameworks to do it.
-
We often look to `.onAppear` or the nascent `.task` modifier to run single purpose tasks. But, those aren't reliable in all cases.
-
When presenting sheets in SwiftUI that depend on a local variable, there are two ways to do it. Turns out, one of them is quite wrong.
-
So, you've got some struct models to pass around that end up as @State. How do you do it?
-
Xcode previews are there to make use faster. And they do - but if you want to test out bindings, you need to give it a little bit of thought.
-
For this Modifier Monday entry, we look at a new iOS 16 toy, .accessibilityActions().
-
User activities and SwiftUI never really fit like a glove, but regardless they are key for state restoration. Luckily, SwiftUI has a little trick to make the process pragmatic a...
-
So, how do you notify UIKit that something happened in SwiftUI? And how about the other way?
-
Tuples have long been in the Swift language, but their utility knows no bounds. I've recently used them to make magic number type of situations, less magic.
-
Xcode previews are incredibly useful for SwiftUI development. But, we can also cross over to UIKit and still reap their benefits.
-
Today, it's all about manipulating the Shape type. Let's see what trim() can do for us.
-
For the inagural Modifier Monday entry, let's take a peek at .fixedSize().
-
Xcode Previews for SwiftUI has quite literally changed a decade old workflow. Here are the techniques I currently live by.
-
The amount of power and engineering behind SwiftUI is extraordinary. Let's breakdown what's happening when one creates a new project using it.