Show newer

Unit tests and documentation.

I hardly recognise myself 🥹

Show thread

I have actually become obsessed with adding DocC to everything. It's remarkable how good everything looks with relatively little effort.

@rwitherspoon I haven’t felt that adventurous yet, but thanks I’ll give it a go!

@dimillian @alpennec @IceCubesApp I used to use the environment exclusively (2nd photo), but views weren't notified of changes. This was fine for most of my views, but some needed to be live.

For these I have a @Setting property wrapper mapped to a StateObject that listens for changes in the defaults. I switch between the two depending on what I need, but they all utilise the same keys.

@linus you mean you DON’T want your emails loaded with 50,000 tables and style tags??

@dimillian @alpennec @IceCubesApp that's neat, thanks for sharing.

I went down the route of mimicking environment keys, which works great, but not sure it was worth all the time/effort replicating AppStorage 😛

@dimillian @IceCubesApp never thought to embed app storage in an observable object before. How do you go about accessing them outside the view, or do you not need to?

Okay I'm only adding font formatting because without it my panel is unbalanced.

This is how you prioritise features guys.

Show thread

Does anybody actually set a custom font when emailing?

@jknlsn scrollTo isn't labeled as MainActor/Sendable, so I’d be wary of calling it from inside a Task.

It's likely your onChange is being fired before the view has had a chance to redraw, so there's nothing to scroll to yet.

Has anyone successfully used “Preview on Device" with a standalone Swift package?

I get a crash report from Xcode but the error is fairly cryptic. I'm assuming because there’s no target it has a meltdown?

Bonus: Can anyone tell me how to get the keyboard to display on a SwiftUI preview?

@gadgetero they should have just rounded up to a nice even 9.99. Those marble walls aren’t gonna pay for themselves!

Show older
The Not So Big Company

The home of The Not So Big Company on Mastodon.