Я пытаюсь поддерживать iOS 17+.
Можно ли отслеживать положение прокрутки разделов списка? Что бы я ни пробовал, ничего не получается. .scrollPosition() не поддерживается для списков?
import SwiftUI
struct ContentView: View {
@State private var activeSection: String?
let sections = [
"2026-01-01",
"2026-01-02",
"2026-01-03",
"2026-01-04"
]
var body: some View {
VStack {
Text("Active section: \(activeSection ?? "none")")
.padding()
List {
ForEach(sections, id: \.self) { section in
Section {
ForEach(0..
Подробнее здесь: https://stackoverflow.com/questions/798 ... is-working