@dale_price@mastodon.online
@dale_price@mastodon.online avatar

dale_price

@dale_price@mastodon.online

#web & #ios developer

This profile is from a federated server and may be incomplete. Browse more on the original instance.

dale_price, to random
@dale_price@mastodon.online avatar

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?

https://www.theverge.com/2024/5/30/24167870/ecobees-smart-thermostat-can-automatically-respond-to-a-heatwave

dale_price, (edited ) to SwiftUI
@dale_price@mastodon.online avatar

If you have a 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?

dale_price, to random
@dale_price@mastodon.online avatar

😳 Zuck’s alt text!

(Which person do you think counts as the “1 person”? Also, he’s claiming this is a PHOTO he took??)

dale_price, to random
@dale_price@mastodon.online avatar

@ivory This seems like it could be a macOS bug, but I don't think I've seen it outside of Ivory: Undo/Redo goes haywire in the compose view and…

  • sometimes Undo (or cmd+z) does nothing at all
  • sometimes Undo does nothing except highlight a random part of my post
  • sometimes Undo goes too far back and deletes most or all of the text I've written
  • Redo stays grayed out/unusable no matter what

It seems to be worse if I've typed something that triggers autocorrect.

Ivory 1.9.3, macOS 14.4.1

dale_price, to Houston
@dale_price@mastodon.online avatar

This was the clearest photo I got due to clouds, but not quite at the peak of the . 1:27 PM CST, , TX

dale_price, to swift
@dale_price@mastodon.online avatar

What's the proper way of handling Required Reason APIs when the API in question is only referenced by a part of a 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”

dale_price, to random
@dale_price@mastodon.online avatar

@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.

https://mastodon.online/

dale_price, to random
@dale_price@mastodon.online avatar

Web-based iOS app installs are going to be a shitshow. Anyone who has ever downloaded a Windows app knows what I’m talking about.

Mac users who have no idea, you were spared because it’s a fairly niche platform. iOS won’t be so lucky.

dale_price, to SwiftUI
@dale_price@mastodon.online avatar

pixelLength is “usually equal to 1 divided by displayScale” according to the docs for EnvironmentValues.

What does "usually" mean here? In what situations is pixelLength not the reciprocal of displayScale?

dale_price, (edited ) to SwiftUI
@dale_price@mastodon.online avatar

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.

Minimal example project in case anyone wants to try it: https://github.com/daprice/swiftui-scroll-view-breakage.git (also filed as FB13635112)

dale_price, to random
@dale_price@mastodon.online avatar

Hot take: the strengths that set the web apart have always been:

  • predictable back/forward navigation UI & browsing history
  • user control over tabs & windows
  • URLs that can be copied, shared, bookmarked, and linked and let you see how sites are structured
  • a standard set of UI elements that behave consistently across all sites (lol @ what JS frameworks have done to that one)
  • overall experience controlled by the user, not by the site/app

PWAs take away most or all of that.

dale_price, to random
@dale_price@mastodon.online avatar
dale_price, to random
@dale_price@mastodon.online avatar

never, ever forget to feed your Mogwai after midnight

dale_price, to mastodon
@dale_price@mastodon.online avatar

The state of sharing HDR photos on … 😬

  • HDR JPG: Masto reduces it to SDR 😒

  • 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 🥴

dale_price, to random
@dale_price@mastodon.online avatar

@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.

dale_price, to random
@dale_price@mastodon.online avatar
dale_price, to mastodon
@dale_price@mastodon.online avatar

Help, updated the text of the post visibility options again and I can't make heads or tails of them

dale_price, to SwiftUI
@dale_price@mastodon.online avatar

Well, this is disappointing: it doesn't seem like the 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. 🙃

dale_price, to random
@dale_price@mastodon.online avatar

Today I tried again with the exact same 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

dale_price, to random
@dale_price@mastodon.online avatar

Every time there's an update I lose like 3 days of work to this 😢

On my slow connection it takes most of a day to download a platform, then when it's finished it fails and has to start over.

"Show details" says my disk is full, but it doesn't matter how much space I free up, it just takes 5-6 attempts and then works out of the blue

dale_price, to random
@dale_price@mastodon.online avatar
dale_price, to SwiftUI
@dale_price@mastodon.online avatar

I implemented a variable blur similar to the effect Apple uses throughout iOS as a metal shader and gave it a wrapper that lets you control the effect with a mask to create all sorts of effects

On GitHub as a 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!

Screenshot of Xcode preview showing the “rectangle.checkered” SF symbol with a blurry vignette around the edges
Screenshot of Xcode preview showing the “circle.hexagongrid” SF symbol with a blur across the whole image except for a rounded rectangle in the middle which is in focus

dale_price, to SwiftUI
@dale_price@mastodon.online avatar

Following @twostraws ‘s incredible Metal shader tutorial (https://mastodon.social/@twostraws/111420275629333555) and wondering if there’s a way to determine what color space our shaders operate in.

I.e. sRGB or P3? HDR or SDR?

I’m assuming it’s just whatever the device screen happens to be, but I’m not sure how to get that information into my shader function.

It looks like if we make our own metal views (MTKView) there’s an API to specify that stuff, but maybe not with SwiftUI’s visual effect modifiers?

dale_price, to random
@dale_price@mastodon.online avatar

Trick or treat, Tim 🎃

dale_price, to random
@dale_price@mastodon.online avatar
  • All
  • Subscribed
  • Moderated
  • Favorites
  • anitta
  • thenastyranch
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • ngwrru68w68
  • megavids
  • magazineikmin
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • provamag3
  • tester
  • Leos
  • JUstTest
  • All magazines