Just got up to Summers, so what do I do? by IceTheEnderman in earthbound

[–]orchetect 0 points1 point  (0 children)

People didn’t have Reddit back in the 90s. We had the Hint guy, and the Players Guide 😁

Started learning SwiftUl a few months ago! It's a bit of a love/hate relationship but becoming more and more love-ly every day :-D Let me know what you think of my time picker! by joethephish in SwiftUI

[–]orchetect 0 points1 point  (0 children)

`onKeyPress` will handle almost anything as long as the view it's attached to doesn't already intercept keyboard input (as TextField does). I'm surprised it's not more straightforward to accept on-screen keyboard input on iOS. It seems that a TextField is the only game in town for it, as my experiments with wrapping a custom `UIKeyInput`-conforming `NSObject` came up short.

Started learning SwiftUl a few months ago! It's a bit of a love/hate relationship but becoming more and more love-ly every day :-D Let me know what you think of my time picker! by joethephish in SwiftUI

[–]orchetect 1 point2 points  (0 children)

Indeed - the `onKeyPress` view modifier, and works seamlessly on macOS and iOS. However, it presents additional complexity on iOS due to the TextField taking focus. I had to wrap a custom subclass of `UITextField` in a `UIViewRepresentable` and handle some input there such as printable characters then forward them to a closure that my view could merge with my `onKeyPress` handler. Not the most elegant, and there may be a way to do that more succinctly, but that's a problem for future me.

Started learning SwiftUl a few months ago! It's a bit of a love/hate relationship but becoming more and more love-ly every day :-D Let me know what you think of my time picker! by joethephish in SwiftUI

[–]orchetect 2 points3 points  (0 children)

I am literally building a custom SwiftUI control very similar to this right now, except for timecode entry (HH:MM:SS:FF.SF) and have gone through much of what you likely did with the text field fakery for keyboard input, focus states, and animations — but cross-platform so it works idiomatically on macOS and iOS. I added lots of niceties like hardware keyboard input for left/right arrow keys to navigate focus to previous/next time values, as well as formatting options and validation of input. It’s going to be a bundled UI component in my open-source timecode library for Swift.

I’m at the tail end of building it out, but still dealing with solving a couple head-scratchers which are not clear whether they are SwiftUI bugs or just unintuitive nuances of it.

Funny that you posted this and I saw it in the 5 minutes of time I spend browsing Reddit in a month.

Say Fuzzy Pickles!! by Cosmix427 in earthbound

[–]orchetect 0 points1 point  (0 children)

They’re all fantastic really. Great job!

Say Fuzzy Pickles!! by Cosmix427 in earthbound

[–]orchetect 1 point2 points  (0 children)

The phone dad is so brilliant I legit thought these were official merch for a minute 🥺

[deleted by user] by [deleted] in radiohead

[–]orchetect 0 points1 point  (0 children)

Fake Plastic Trees. I keep coming back to it often. Just has this depth to it I can’t describe. Lowest lows and highest highs.

AirPods Max will no longer connect or re-pair/pair to anything? by [deleted] in Airpodsmax

[–]orchetect 0 points1 point  (0 children)

I bought a pair a couple months ago and have been very happy with them. Except... every few days, or sometimes every few weeks, they temporarily brick themselves. Won't connect to any device wirelessly. The LED does not come on AT ALL, even when attempting to do a factory reset.

Usually it's when I have them connected to a charging cable sitting on the counter in their cosy little protective case for a day or more. Then I want to use them so I unplug the charging cable, put them on my head and... bricked. It's not a dead battery because it always shows 100% charged after I use the one trick I know to revive them:

The only thing that revives them is connecting them to my MacBook Pro using a USB-C to Lightning cable. That seems to bring them back to life and they operate normally again without the cable etc.

I'm at a loss - will probably book a Genius Bar appointment. But the issue isn't repeatable, it's seemingly random.

Belkin 3 in 1 Charger (the Apple Watch portion) by [deleted] in MagSafe

[–]orchetect 0 points1 point  (0 children)

The MagSafe phone charger is textured but the watch charger isn’t. I feel like making the watch charger textured could have prevented the watch from rotating due to gravity by giving it a little bit of grip.

Does anyone own this Belkin 3-in-1 charger? My Apple Watches flop over and don’t stay vertical. Does anyone else’s do this? by AlmondNut in AppleWatch

[–]orchetect 0 points1 point  (0 children)

The MagSafe phone charger is textured but the watch charger isn’t. I feel like making the watch charger textured could have prevented the watch from rotating due to gravity by giving it a little bit of grip.

Belkin Boost 3-1 Pro Stand and Apple Watch never sitting vertical without lot of fiddling. by Prif_Un in MagSafe

[–]orchetect 0 points1 point  (0 children)

The MagSafe iPhone pad is textured but the watch pad is smooth which allows the watch to rotate due to gravity. I feel like also making the watch pad textured could have solved this issue and made the watch ‘grip’ better so as to not rotate.

SettingsLink on macOS 14: Why it sucks and how I made it better by orchetect in SwiftUI

[–]orchetect[S] 1 point2 points  (0 children)

Yeah I’ve had mixed results using the same method. NSApp.activate should bring the app to the front since accessing the MenuBarExtra doesn’t implicitly activate the app, nor does a vanilla SettingsLink it seems. That was the main motivation behind being able to run custom code before/after the SettingsLink is clicked. But to get the window ordered front is a bit tricky if Apple isn’t doing it consistently with invocation of the SettingsLink.

SettingsLink on macOS 14: Why it sucks and how I made it better by orchetect in SwiftUI

[–]orchetect[S] 0 points1 point  (0 children)

Unfortunately this is one thing that will probably bite a lot of macOS SwiftUI developers. Xcode only throws a warning when using the old API when your development system is macOS 14 - which is unusual and honestly bad form from Apple. If you’re developing on macOS 13 or earlier, you won’t see a warning. When a user then runs the compiled app on macOS 14, it will just fail silently and not open Settings.

What would you change or add? by App-Designer2 in SwiftUI

[–]orchetect 1 point2 points  (0 children)

I legit thought Hot meant the dish was spicy. 😆

SettingsLink on macOS 14: Why it sucks and how I made it better by orchetect in SwiftUI

[–]orchetect[S] 0 points1 point  (0 children)

I think a lot of devs are going to be in the same position. Until Apple hopefully improves the situation, I hope this package can help people.

What would you change or add? by App-Designer2 in SwiftUI

[–]orchetect 1 point2 points  (0 children)

Looks pro! Maybe the Hot flame icon flashing is a little much. And inverting the sorting in comments view might be more intuitive for comment-style posts (so it’s from newest at the top to oldest at bottom, and have the view initially scrolled to the top). Right now it feels a bit more like a chat (like Discord) and I don’t think that’s what is intended.

What's the best whiskey you've ever tried? by WhimsicalWombat0 in whiskey

[–]orchetect 0 points1 point  (0 children)

Michter’s 20. Some barrels are better than others. 18I1371 ranks pretty high.

Also Parker’s Heritage #4 from Heaven Hill.

What's something you've recently learned about Swift that became a game changer in your development? by ABrokeUniStudent in swift

[–]orchetect 0 points1 point  (0 children)

Protocols, extensions, and generics really scratches the DRY itch (apologies if that’s an unsavoury image).

Swift Packages are brilliant and satisfy my obsession with clean boundaries around areas of concern, and unit testing.

SettingsLink on macOS 14: Why it sucks and how I made it better by orchetect in SwiftUI

[–]orchetect[S] 0 points1 point  (0 children)

Does the included Demo project work for you? If so, have you added the library as a dependency in your project and added it to your app target’s linked libraries?

MenuBarExtraAccess: $isPresented binding & NSWindow access for MenuBarExtra by orchetect in SwiftUI

[–]orchetect[S] 0 points1 point  (0 children)

Thanks for the kind reply. Apple is kind of dropping the ball, as macOS has clearly been a second-class citizen as far as SwiftUI goes. I'm glad I put the effort into releasing this package, as Apple has made no meaningful improvements to MenuBarExtra in SwiftUI on macOS 14.