-
Biscuits
I found some biscuits that I didn't know I had. They are yum. Winning.
-
Today and Tomorrow
I’m going to want to label my map pins as Today and Tomorrow where appropriate, then Sunday, Monday etc for the remaining days. To do that, I’ll want to look at this post.
-
Smooth As
I really want to try AnyLayout to make the VStack to HStack transition butter-smooth.
-
Make two things the same size
To make two (or more) objects the same height in SwiftUI, just make them all .frame(maxHeight: .infinity) and then make the container they're in .fixedSize(horizontal: false, vertical: true). In this instance, '.fixedSize()' really means 'minimum size'.…
-
MapKit Tutorial Videos
Stewart Lynch has made a YouTube playlist of MapKit tutorial videos.
-
Landscape vs Portrait
This post shows how to tell if you're landscape or portrat. GeometryReader { geometry in if geometry.size.height > geometry.size.width { print("portrait") } else { print("landscape") } But Apple suggests that you…
-
Internationalisation / Localisation / Translation
If I'm doing it all myself (or managing translations via chat or Discord or something), then I just need TranslateKit. If I want to crowd-source the translations, and/or allow folks to do it themselves in their own time on a separate system, I could…
-
Brother, I need a printer.
Need a new printer, in 2024? Maybe have a read of this.
-
@Observable
Might need to make my state class @Observable. As always, Paul has my back.
-
Swift fatalError()
To trigger a fatal error, you want Paul's guide to fatalError().
-
async button
Mahid has an interesting idea for an async button. struct AsyncButton<Label: View>: View { let action: () async -> Void let label: Label @State private var isRunning = false init( action: @escaping () async -> Void, …
-
Rock pools
... and other lovely swimming spots. The folks at Kids in Adelaide have put together a list.
-
Game Tile Image Assets
... for free! :) From Kenney.
-
Testing Network Code in Swift
As with most Swift / SwiftUI questions, the answer is to see what Paul has written about it.
-
One Target, One Scheme, Two Build Configs
Rather than having two separate Targets and two separate Schemes, maybe just have one of each. We can get different Info.plist values by having one Custom iOS Target Property set to a Build Setting, and then have two values for that Build Setting. One for…
-
Clear UserDefaults
To clear all UserDefaults from an app, maybe try this: if let appDomain = Bundle.main.bundleIdentifier { UserDefaults.standard.removePersistentDomain(forName: appDomain) } Thanks to Sourabh Sharma for this idea. Or maybe…
-
Lucky
I am very fortunate in my work. I'm paid a decent amount, to do work that is (mostly) quite interesting, with people who are good to work with. That said, I'd rather be building my Lego Great Wave.
-
Async/Await - DJIA
To get the DJIA open in the background, take a look at this post or this one, or maybe just go straight to Paul's overview.
-
Dynamic Wallpaper
To make dynamic wallpaper, which changes for dark mode vs light mode, I generally use Wallpapper.
-
To @State or not to @State…
To understand @State and all the other SwiftUI property wrappers, maybe take a look at Paul’s outline. Clear and simple, with just enough info to be useful but not enough to confuse.