Possibly the same issue here. Sections not needed to reproduce issue with SwiftUI List in iOS 26, 26.0.1, and 26.1.
Filed back in mid-August FB19602925
Minimal code to repro:
struct Item: Identifiable, Hashable {
var id: Int
var title: String
}
struct ContentView: View {
@State var items: [Item] = [
Item(id: 0, title: "One"),
Item(id: 1, title: "Two"),
Item(id: 2, title: "Three"),
]
var body: some View {
List(items) { item in
Text(item.title)
.swipeActions(edge: .trailing) {
Button("Pin", systemImage: "pin") {
pinItem(item)
}
.tint(.green)
Button("Copy", systemImage: "document.on.document") {
duplicateItem(item)
}
.tint(.blue)
}
}
.listStyle(.plain)
}
func pinItem(_ item: Item) {
if let idx = items.firstIndex(of: item) {
items.move(fromOffsets: IndexSet(integer: idx), toOffset: 0)
}
}
func duplicateItem(_ item: Item) {
let newId = (items.map(\.id).max() ?? 0) + 1
items.insert(Item(id: newId, title: "Copy of \(item.title)"), at: 0)
}
}
Topic:
UI Frameworks
SubTopic:
SwiftUI