frederik_diamond on Nostr: Done some more progress on my Mac application. Now, the state of the SwiftUI sliders ...
Done some more progress on my Mac application. Now, the state of the SwiftUI sliders is successfully saved.
Which means, even when quitting the app (CMD + Q), and reopening the app, it will remember where all the sliders were positioned. This means, the sliders no longer reset after switching view or quitting the app.
This is currently only working for the app-specific sliders, not the master volume — that is the next thing I will work on.
I am building a MacOS app called Pretty Mixer. It will be a beautiful audio mixer for Macs that allows you to adjust the volume of each individual application on your Mac.
It’s still very early in development, but the video shows a sneak peek.
The next step is to save all the states, including the positions of the sliders, to memory. Currently, everything resets after switching to a different view.
It's a lot of fun. I've never worked with Swift before, so I am learning a lot while building this application.
{
"id":"ae56741bcccaac3751d7082f3b84caec131cceef29df12caf027e5943e43ab0f",
"pubkey":"9c9f81ed795f0f5efa558932824687d84fc7e6a4cfa6db5d6d3b50fcb7ffaec2",
"created_at":1713358217,
"kind":1,
"tags": [],
"content":"Done some more progress on my Mac application.\nNow, the state of the SwiftUI sliders is successfully saved.\n\nWhich means, even when quitting the app (CMD + Q), and reopening the app, it will remember where all the sliders were positioned.\nThis means, the sliders no longer reset after switching view or quitting the app.\n\nThis is currently only working for the app-specific sliders, not the master volume — that is the next thing I will work on.\n\nFor anyone interested, I ended up using UserDefaults (https://developer.apple.com/documentation/foundation/userdefaults).\n\n#swift #swiftui #mac #apple #dev \n\nhttps://m.primal.net/HwOz.mov \n\nnostr:note157srnv94knsuyyjwfl390kxq3h5e398p63t0umf3jr9cx8rxertsxukyja",
"sig":"f99b43e18e5bef0276befd5aa9b84e0ca128d5cfb78463c3182528737cf1695e61b6883eb0c3a35760d7d19871a42e28f051314563ce95dd5f21a93397738811"
}