Post

Replies

Boosts

Views

Activity

Comment on Implementing RawRepresentable for a DictionaryType has broken my Test target build. Not sure how to fix things...
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
Topic: Programming Languages SubTopic: Swift Tags:
Feb ’25
Comment on Trying to better understand CGAffineTransform.... and need a bit of guidance.
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 :-)
Topic: Graphics & Games SubTopic: General Tags:
Jan ’25
Comment on Trying to better understand CGAffineTransform.... and need a bit of guidance.
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
Topic: Graphics & Games SubTopic: General Tags:
Jan ’25
Comment on Should Photo Extensions work in iOS simulators?
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 :-(
Topic: App & System Services SubTopic: General Tags:
Jan ’24
Comment on Seeing some behaviour in Swift that I don't understand...
wow, thanks for such a clear explanation. And while it seems obvious with the benefit of hindsight, I appreciate your patience explaining this. thanks Claude :-)
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’25
Comment on How can I flag a SwiftUI Text's string literal to not be added to Localizable.strings
oh wow. that is a splendid nuance to the original answer. Thanks for adding this :-)
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Mar ’25
Comment on Implementing RawRepresentable for a DictionaryType has broken my Test target build. Not sure how to fix things...
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
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Feb ’25
Comment on Trying to better understand CGAffineTransform.... and need a bit of guidance.
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 :-)
Topic: Graphics & Games SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jan ’25
Comment on Trying to better understand CGAffineTransform.... and need a bit of guidance.
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
Topic: Graphics & Games SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jan ’25
Comment on How can I programmatically have focus in a SwiftUI TextField at launch/load
Thanks for letting me know you also see this. Here's the feedback assistant link: https://feedbackassistant.apple.com/feedback/15523685
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’24
Comment on How might I get didSet behaviour on an AppStorage var?
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 :-)
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
May ’24
Comment on My SwiftUI code is becoming un-SwiftUI-y. I'm looking to make things right again.
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.)
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
May ’24
Comment on My SwiftUI code is becoming un-SwiftUI-y. I'm looking to make things right again.
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...
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
May ’24
Comment on My SwiftUI code is becoming un-SwiftUI-y. I'm looking to make things right again.
Hi @interferon , sadly didSet does not appear to be getting called on any of my AppStorage vars
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
May ’24
Comment on Does running a single test in a Target containing unit tests start by running the actual app?
Wonderful. Thanks very much for this very helpful answer :-)
Replies
Boosts
Views
Activity
May ’24
Comment on Unexpected behaviour when attempting to decode enum keys from a JSON dictionary
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
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Mar ’24
Comment on Problems in the iOS Simulator's Photos app?
https://feedbackassistant.apple.com/feedback/13518421
Replies
Boosts
Views
Activity
Jan ’24
Comment on Should Photo Extensions work in iOS simulators?
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 :-(
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jan ’24