oh wow. that is a splendid nuance to the original answer. Thanks for adding this :-)
Post
Replies
Boosts
Views
Activity
Thanks Quinn, this makes sense. My 'final destination' is:
@AppStorage("scriptPickers") var scriptPickers: ScriptPickers = ScriptPickers.defaultDictionary
In order for this to work I implemented RawRepresentable for ScriptPickers.
While the part of my brain that likes efficiency has an allergic reaction to:
struct ScriptPickersWrapper: {
let scriptPickers: ScriptPicker
}
I now see how this is preferable to adding a RawRepresentable conformance for Dictionary.
thanks
Stepping back from my specific question, I'm performing a scale and a rotation, both of which need to be compensated with a translation. While I'm currently doing this in 3 steps:
translate (compensating for both scale and rotation)
scale
rotation
My plan is to just directly set a,b,c,d,tx,ty in one step. (now that I think I at least partly understand what I'm doing :-)
Your sample code is exactly what I needed to do (ie translation before rotation)
Stepping back from my specific question, my larger goal is to perform 4 steps
scale up in size
translate (so the scale happens about a specific 'center' point)
rotate
translate (so the rotation happens about the same centre point)
Based on the feedback here I've change to
translate (to compensate for the scaling)
translate (to compensate for the rotation)
scale up
rotate
Thanks Claude
Thanks for letting me know you also see this. Here's the feedback assistant link: https://feedbackassistant.apple.com/feedback/15523685
Hi Claude,
This sounds encouraging. My current theory is that willSet/didSet works for @AppStorage var's in View's but not for @AppStorage var's in other types of objects (eg, in my case, a class)
I will investigate this tomorrow morning, and report back with a more complete code snippet.
thx :-)
Thanks @Claude31 This is likely what I'll have to do. The problem is that .onChange (I believe) is typically used in the body var of a View. my WordsManager is a class.
Is it possible to use .onChange in something like my singleton class? (my current understanding is this is not possible.)
Thanks for the suggestion @ssmith_c . Unfortunately, I haven't been able to create an AppStorage var with a custom setter that the compiler likes. Definitely open to suggestions...
Hi @interferon , sadly didSet does not appear to be getting called on any of my AppStorage vars
Wonderful. Thanks very much for this very helpful answer :-)
I ended up doing a two step decode:
decode to a [String: Localization] dictionary
use the step 1 dictionary to create a [Language: Localization] dictionary
https://feedbackassistant.apple.com/feedback/13518421
Hello gchiste,
your assumption is correct. I was referring to a "Photo Editing Extension" I still do not see my extension when I follow the above steps, however I do see it when I follow these steps:
run my new 'empty' PhotoEditingExtension target in an iOS simulator
select photos as the app to run
open a photo
tap 'Edit'
tap the ... button in the Edit view
Following the above steps no a physical device I don't see my extension in the Options bottom sheet :-(