I created a view (headerView) that contains an 'info' button, this view sits at the top of the screen and various views are shown beneath it. When pressed an actionSheet should appear, everything was working fine but suddenly the actionSheet refuses to appear, when pressed, the button is changing the state variable to true as expected and even the phone vibrate triggers, the only thing not working is the actionSheet appearing. Swapping actionSheets for an alert gives the same issue. Here's the code to generate the view and the actionSheet:
Code Block struct headerView: View { @State var showInfo : Bool = true var body: some View { HStack(alignment: .bottom){ Image(systemName: "info.circle") .padding(.trailing) .font(.title) .foregroundColor(.blue) .foregroundColor(.blue) .frame(width: 35.0, height: 35.0) .hidden() Spacer() Image("Icon") .resizable() .frame(width: 45, height: 45) .cornerRadius(5.0) Image("TextHeader_light") .resizable() .frame(width: 107.0, height: 39.0) Spacer() // info button Button(action: { showInfo = true AudioServicesPlaySystemSound(kSystemSoundID_Vibrate) print (showInfo) }) { Image(systemName: "info.circle") .resizable() .padding([.bottom, .trailing]) .font(.title) .foregroundColor(.blue) .frame(width: 35.0, height: 35.0) } } .actionSheet(isPresented: $showInfo) { ActionSheet(title: Text("Title Text"), message: Text("My text goes here"),buttons: [.cancel {showInfo = false; print(showInfo)}]) } } }