Hello everyone,
I have a problem in a project I am currently working on. Some background information regarding the problem is that I am creating some buttons in a foreach loop in another script that retrieve information from a server. These buttons are displayed in a grid with a width of 2 entries. The element that the buttons belong to also contain a fullScreenCover functionality, but the full screen cover functionality is only being called for the top four entries in the grid but the button works on all of the entries.
Here is the partial code:
Button(action:{
let _ = print("Button was clicked",self.title)
isDetailPresented.toggle()
let _ = print("Button was clicked",self.isDetailPresented)
}) {
VStack {
...
}
.foregroundColor(Color.black)
.fullScreenCover(isPresented: $isDetailPresented, onDismiss: {
//some function is being called here
let _ = print("Moving on")
}, content: {
let _ = print("I have moved on")
//a view to be opened
})
I already checked that the boolean changes on all entries but I can't figure out why the content is not being displayed for the entries below the 4 top ones. Any help would be appreciated.