Am I right in saying #SwiftUI doesn't really have undo/redo support? It does make an UndoManager available in the Environment, but if you (say) hook up a Toggle, Slider, Picker etc to a binding, it won't support undo/redo and doesn't seem to have any built-in mechanism to do so?
This is my attempt to fill in the gap, but I wouldn't be suprised if there are better ways. If instead of binding a widget to $someItem.someProperty you bind it to UndoableBinding(target: someItem, undoManager: undoManager).someProperty (you can cache this struct & reuse it…)
…then undo & redo should work as expected. Surprisingly, sliders don't seem to spam the undo stack with continuous updates, even tho the binding itself updates continuously? This seems to suggest something, somewhere is context-aware, but not sure what...
• • •
Missing some Tweet in this thread? You can try to
force a refresh
Ferrite 2.6 can record in stereo with the built-in mics on some iPhones. There’s a little confusion out there about how it works, which is understandable, since iPhones don’t have mics set up for stereo recording! Here’s a thread about it, if you’re interested:
(For clarity: Ferrite has always been able to record in stereo when using an external stereo microphone, or with a stereo USB Audio Interface. This is just about the mics built into the iPhone itself.)
iPhones have many mics in them, but they’re designed for other stuff — mainly improving the quality of voice calls and Siri’s ability to hear you in noisy environments. So they’re positioned for those tasks, not stereo. For stereo recording, the iPhone has to do some… tricks.
Displacement activity: During R&D phases, I often end up with a bunch of testbed apps on my devices, trying out different tech & so on. Since they all have the same default template icon, it can be hard to pick them apart at a glance. So:
…I procrastinated my way into hacking together a quick SwiftUI-based Mac app, where I can drag-and-drop any glyph from the Mac's Character Viewer palette & it’ll instantly blueprint-ify it. Can then export a single 1024px image, or complete set of sizes ready to drop into Xcode.
(Fun fact: you can also drag any glyph from SF Symbols, and it’ll work — but you probably shouldn’t, as shipping an app with an icon made from an SF Symbol is likely to violate their T&Cs.)
Ferrite 2.5 is now rolling out across the App Store. The three most visible changes? Enhanced trackpad/mouse support, Presentation Mode, and Deleted Items.
(Ferrite continues to work on iOS 12.4 for now, but you’ll need iOS 13.4 to take advantage of all the latest features)
Presentation Mode is a new feature to help folks teaching others how to use the app. It can be tricky to show gestures & keyboard shortcuts, especially when teaching via video (e.g. due to social distancing…). So Presentation Mode shows them on-screen. Customisable too:
The support for the new mouse, trackpad and keyboard features in iOS 13.4 is extensive. Not just a few hover states, it’s deep integration that makes it more desktop-like but with iOS flair and feeling. e.g. hold Option key & the pointer morphs into a selection bar:
New update to Ferrite has been released — mostly minor fixes, performance improvements, that sort of thing. It does also include a big update to the User Guide, now featuring a full search facility:
You can just type some text and it'll search for it throughout the guide — but it'll also suggest chapters or keywords you might be interested in:
The User Guide used to be written in raw HTML, but that got increasingly difficult to manage due to all the variations (iPhone/iPad, iOS 12/13, print version etc). Now, it's written in an unusual way — in #SwiftLang of all things, using some similar techniques to SwiftUI:
If you want to make a Mac app, there are _4_ primary APIs you could be using, in a sorta 2x2 grid: AppKit, UIKit (w/Catalyst), SwiftUI-in-AppKit, SwiftUI-in-UIKit. It’s a complex mess of what each does/doesn’t support — figuring out which to use for any given UI is trial & error
I’ve been trying to make one relatively simple bit of UI (in a standalone testbed app) for days. Every time I think I’m on a roll, I bump into a different wall of missing functionality. I try different implementations. I try different designs that don’t need same features.
It’s not even like you can say “Screw it, I’ll do everything old-school pure native AppKit and get access to everything”, cuz you'll still be missing some things (e.g. SF Symbols aren’t supported, even tho they are all available on Mac since Catalyst apps can use them).
Trying to get stuff ready for the iOS 13 launch that’s (probably?) going to happen in the next week or so. Going through mopping up text translations. And I find that, wow, localised text in "static cells" table views seems to be broken when built against iOS 13 SDK
Even when running on iOS 12. Other text translates fine, but table cell text is ignored. Created a minimal repro project, previews A-OK in Xcode, broken on-device.
FB7198417
Not-shipping isn’t an option, so AFAICT my only way forward is to spend a day or two writing a hand-coded translation system for table views, manually Cmd+C/Cmd+V text from built-in system to workaround (in languages I don't speak) & hope nothing gets mixed up 🎉 WCGW?