i want to detect when the user scroll on the scrollview and above a certain scroll item show up a button, i wrote this code on my up looking online some example but there is no printout on the change of scrollID, why??
ScrollView {
LazyVGrid(columns: columns) {
ForEach(group) { g in
NavigationLink {
Text("Details")
} label: {
VStack {
Image(systemName: "tv") // Replace with actual images
.resizable()
.scaledToFit()
.frame(width: reader.size.width/3, height: 50)
.padding()
.background(Color.gray.opacity(0.2))
.cornerRadius(10)
Text("List")
.bold()
.font(.subheadline)
}
.foregroundStyle(.white)
}
}
}
.scrollTargetLayout()
}
.scrollPosition(id: $scrollID)