I have custom view with different content inside including Button.
For example:
VStack {
Text("Some text")
Button() // 1-th
Button() // 2-th
.disabled(false) // This doesn't help, despite it logical
}
.disabled(true) // Line with disabling
I want 2-th button to be always enabled no matter what is set in "Line with disabling".
CodePudding user response:
According to the documentation this does not work that way. It works the other way around. As you allready discovered the .disable
on the parent overrides the value set in the child.
Possible solution would be to not use the parent .disable
instead use it on each child element.