Am I the only one who thinks that instead of shutting off life-saving air conditioning during a heat wave, the solution should be to reduce NON-ESSENTIAL loads so people can cool their homes?
If you have a #SwiftUI app with a grid (e.g. LazyVGrid) or LazyVStack, how are you handling focus/keyboard navigation?
Wondering because it looks to me like just adding .focusable() to each item is all that’s needed for single selection…
but "The SwiftUI cookbook for focus" from WWDC23 says to add .focusable() to the grid view and then implement your own focus ring, keyboard navigation, & tap/click handling from scratch for each platform, which seems… brittle and not very SwiftUI-ish?
#iOSDev What's the proper way of handling Required Reason APIs when the API in question is only referenced by a part of a #swift package dependency that I'm not ever calling?
None of the usage reasons fit – there's no way to declare “this is only linked because a dependency references it, but I pinky promise my app doesn’t actually call it”
@ivory Is quoting someone supposed to work if I also have a link in my post? In Ivory's composer, this showed the post I was quoting. After I posted it, there's a preview card for the mashable link I added, but the quote doesn't show up.
Welp, this is nasty: when focus leaves a TextField, every scroll view with a scrollPosition modifier anywhere in the app starts behaving unpredictably…
but only on certain devices. I can reliably reproduce it on my iPhone and Mac (“designed for iPad" target) but NOT an actual iPad and not any simulators.
HEIC: “422Validation failed: File has contents that are not what they are reported to be.” 🤦♂️
HDR AVIF: “503” (no error message, just 503) 🤷♂️
HDR PNG: kinda works! But the file sizes are ridiculous and it doesn't display correctly in browser 😞
single frame MP4 video: the only thing that works! Looks great in browser and Ivory! But it shows up as an animated gif and the thumbnail is completely fucked 🥴
@ivory in case this helps narrow down the issue with double tap to zoom out not working, it seems to be related to device resolution and orientation. The images in https://social.coop/@scottjenson/111874830107881587 trigger it on my iPhone 11 Pro in portrait orientation but not landscape. On 11” iPad Pro it happens in both orientations. (this is in Ivory 1.8.3)
With most other images I’ve seen the issue on, the iPad is unaffected and the iPhone has the issue in portrait only.
Well, this is disappointing: it doesn't seem like the #SwiftUI scrollTransition modifier works with effects that apply Metal shaders (layerEffect, colorEffect, etc).
You can use one and it shows up, but it only renders the initial value and doesn't animate when the scroll phase changes. 🙃
Today I tried again with the exact same #Xcode simulator installation command that was giving me "disk almost full” errors for the past few days, and it Just Worked™.
I literally did nothing, just closed my laptop yesterday, opened it today, and the problem is magically gone. I have the exact same amount of disk space that wasn't enough yesterday.
Really sucks having to wait an unspecified number of days for my Mac to decide I have enough disk space every time there's a new iOS SDK
I implemented a variable blur similar to the effect Apple uses throughout iOS as a metal shader and gave it a #SwiftUI wrapper that lets you control the effect with a mask to create all sorts of effects
On GitHub as a #Swift package: https://github.com/daprice/Variablur – I'll give it a better readme sometime, but for now you can use Xcode's documentation viewer and previews.
Thanks to @twostraws's Inferno project and tutorial for inspiring me to try this!