@danielsaidi@moosethedev@_JohnGibson_ If you’re worried about the user’s dynamic type settings, you can always use a scaled metric property for the width and height.
@moosethedev@_JohnGibson_ I tried it and it works 🙌 ...however, applying a fixed size messes with accessibility, so I've decided to just use plain images instead of having the circular shape. But thank you!
Anyone who knows if there's a way in #SwiftUI to make all SF Symbols in a group use the same size, besides applying a scale to fit and a fixed size to the container?
I'm having a go at updating view models to use the new @Observable macro in #iOS17 ... updating some were trivial but I'm running into a little resistance with others.
Take, for example, this tip jar store model, which was previously defined like this at the @main App level:
@StateObject private var store = TipJarStore()
MainView(...).environmentObject(store)
And, after updating, is now like this:
@State private var store = TipJarStore()
MainView(...).environment(store)
and all previous @Published properties inside the model are now just declared as regular vars.
The problem is that what was the @Published properties in the tip jar view formed bindings to alerts and is now giving compile time errors.
I realize that the solution here is to apply the new @Bindable property wrapper, like this in the view:
@Bindable var model: TipJarStore
But then I lose the advantage of injecting the model into the environment and accessing it only in the tip jar view. If I change it away from the environment, it means I have to pass it through ~10 intermediate views, none of which use it, which is not great.
Am I missing anything here – is there a way to make bindings work whilst keeping it in the environment?
Hey @elonmusk, it’s frustrating when you accidentally swipe away from a video deep in the scroll and can’t find it again. Could we get a feature that allows us to shake our device and return to the last viewed video?
Do you get the ick when you hear certain words?
The one I’ve realised most recently that is completely hideous to me is ‘pernickety’ *shudders*
What’s your ick word(s)? If you can handle typing it out without doing a sick all over yourself, that is.
🌍 We’re going to test a new Twitter feature. We will add the first 150 people who reply to this tweet to a ‘Twitter Circle’. Those 150 will be the first to see what icons we’re dropping every Thursday, plus more.
❋ Reply ‘I want in!’ and we’ll add you.