SwiftUI ScrollView only scroll in one direction
问题 Trying to make a custom list using a view as the list row style (to get rid of the ugly line separates in the list by default). However, once I put my ZStack rows inside a scroll view, the scroll view scrolls in both directions and not just vertically. Here is the contentView: NavigationView { ScrollView{ VStack(alignment: .leading){ ForEach(friends) { friends in NavigationButton(destination: MessageDetailView(friend: friends)) { CustomListItem(friend: friends) } } Spacer() } }