Hi all,
So i have this very simplified code, where I basically have an HStack with a custom modifier.
My question is, how can i keep the modifier on the HStack, but dont let the modifier apply to the button inside the HStack?
In this case i could just apply the modifier directly to the textfield, but as i mentioned, this is a very simplified version of my code, so let’s just assume the modifier has to be on the HStack
Modifiers applied to the parent view are applied to all the Views within that view. You have to be careful how you apply modifiers to avoid unexpected results.
I don’t know of a way to prevent a modifier from applying to a particular object within a view.
When it comes to animation there are ways to prevent animation from applying to specific objects and that is done by adding the modifier .animation(.none) but that’s a specific case.