'How to bring the overlay of one section in front always in swift UI inside list view?
I was trying to create the UI similar to this, went through the few articles and found that overlay should be used to create the same UI, However everything is fine unless List or any iterating view is used, when the overlay crosses the other sections frame it doesn't seem to be behaving as expected?
List { // 3 elements
HStack(){
DropdownSelector(
placeholder: "Day of the week",
options: options,
onOptionSelected: { option in
print(option)
})
.padding(.horizontal)
.zIndex(1)
DropdownSelector(
placeholder: "Day of the week",
options: options,
onOptionSelected: { option in
print(option)
})
.padding(.horizontal)
.zIndex(1)
}.zIndex(1)
}
Any suggestion ?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
