SwiftUI – Automatically add dividers between each element of a `ForEach` – Ios swift
I'm using a ForEach to display the contents of an array, then manually showing a divider between each element by checking the element index. Here's my code: struct ContentView: View { let animals = ["Apple", "Bear", "Cat", "Dog", "Elephant"] var…