Post

Replies

Boosts

Views

Activity

Comment on Tokenised text search in SwiftData help
Thank you so much! I’m a new developer and have been debating whether CoreData would be better for my app, for other reasons but particularly the predicates I will need. The number of tokens will be unknown so your response gives me the confidence to switch. I have two related questions that I'll put into a reply, it would be awesome to get a response to those.
Jul ’24
Comment on Persisting Color from ColorPicker
Yeah I considered saving it as a hex string the problem is ColorPicker can have either sRGB or D3 Display color spaces as input (D3 is essentially a superset of sRGB). Color.Resolved produces negative float values for colors outside of sRGB space and I assume would require a longer hex string when encoding them.
May ’24
Comment on How to implement drag and drop of SF Symbols within a SwiftUI grid?
You were entirely correct so thanks again. I went down the documentation rabbit hole and couldn't find anything more suitable. I ended up overlaying the entire board grid (rather than the grid cells) and used the position modifier to place the pieces on the correct square. This required me to write functions that would map between a CGPoint and a discrete square on the board. For now I'm using a fixed sized board frame but I am confident I'll be able to adapt to a dynamically sized board.
Jun ’23