The question is quite simple. I receive entities from API that contains property actions and I need to display them in a list with actions as swipe actions accordingly.
Problem is that I didn't find the way how to iterate actions in swipeActions modificator.
I tried something like this:
List {
ForEach(entities) { entity in
CustomCell(entity: entity)
.swipeActions(edge: .trailing) {
for action in entity.actions {
Button(action: {}) {
Label(action.title)
}
}
}
}
}
and it does not work.
Is it even possible to solve?