Can't make onMove to work on iOS, it is just not triggered. Is this an iOS bug or I'm missing something? On the iPad is working like a charm.
List{
ForEach(names, id: \.self) {name in
Text(name)
}.onMove(perform: { indices, newOffset in
names.move(fromOffsets: indices, toOffset: newOffset)
})
}
Thanks!
Post
Replies
Boosts
Views
Activity
I have a toolbar in which I want to place two buttons in leading and trailing positions, inside an HStack. When adding a Spacer the buttons are no longer visible. Without the Spacer it works (with the buttons being centred in the HStack)
Am I doing something wrong?
Text("Any View")
.toolbar {
ToolbarItem(placement: .bottomBar) {
HStack {
Spacer()
Button(action: {}, label: {
Text("Backlog")
})
Button(action: {}, label: {
Text("Add New")
})
}
}
}