In my ZStack I set shade to vary the background. Nonetheless solely shade I see is altering the highest safearea bar. I need the colour to vary behind the checklist however I’m not capable of change it. But when I delete the checklist from my stack, the entire background adjustments. So the questions is why is my checklist stopping me from altering the black background shade?
var physique: some View {
ZStack {
background(Shade .pink)
VStack {
HStack {
// Settings button on the left aspect
Button(motion: {
self.showSettings.toggle() // Toggle the settings view
}) {
Picture(systemName: "line.3.horizontal")
}
.sheet(isPresented: $showSettings) {
SettingsView() // Now this references the view outlined in SettingsView.swift
.presentationDetents([.height(360)])
}
Spacer()
Textual content("Reshare")
.font(.system(dimension: 20))
Spacer()
Button(motion: {
self.showDeleteConfirmation = true
}) {
Picture(systemName: "trash")
}
.sheet(isPresented: $showDeleteConfirmation) {
DeleteHistoryView(isPresented: $showDeleteConfirmation) {
viewModel.clearHistory()
}
.presentationDetents([.height(260)])
}
}
.padding(.horizontal)
Checklist {
ForEach(viewModel.contents) { content material in
contentRow(content material: content material)
//.listRowBackground(Shade .inexperienced)
}
.onDelete(carry out: viewModel.removeContent)
}
//.listStyle(PlainListStyle())
.onAppear {UITableView.look().backgroundColor = UIColor.clear}
}
.padding(.vertical)
.onDisappear {
// When ContentView is not seen, reset the obtain state
downloadState = .none
}
.onAppear(carry out: checkClipboard)
.onReceive(
NotificationCenter.default.writer(for: UIApplication.willEnterForegroundNotification)
) { _ in
checkClipboard()
}
.overlay(
ToastNotificationView(title: notificationMessage, isVisible: $showingNotification)
.place(x: UIScreen.major.bounds.width / 2, y: showingNotification ? 50 : -100)
.animation(.easeInOut, worth: showingNotification),
alignment: .high
)
.sheet(merchandise: $videoPreviewURL) { videoURL in
VideoPreviewView(videoURL: videoURL.url)
//.presentationDetents([.height(560)])
}
.overlay(
Group {
if downloadState == .downloading {
LoadingIndicatorDownload()
} else if downloadState == .accomplished && showCustomAlert {
// Show the customized alert view with out title and message
CustomAlertView(title: nil, message: nil, isPresented: $showCustomAlert)
}
// Deal with .none and .failed states as wanted
}
)
.ignoresSafeArea(.all, edges: .backside)
}
}