I have a detail view that displays with an absurd amount of spacing and I can't figure out why.
struct MessageDetailView : View {
var friend: Friend
var body: some View {
NavigationView {
List {
ForEach(0..<friend.messages.count) { message in
Text(self.friend.messages[message])
.modifier(textBubbleModifier())
}
}.navigationBarTitle(
Text(self.friend.name))
}
}
}
The Friend struct is pretty simple:
struct Friend: Identifiable {
var id = UUID()
var name: String = ""
var messages: [String] = [""]
}
let friends: [Friend] = [
Friend(name: "Mark Zuckerberg", messages: ["Let's keep things private between you and I, shall we?", "I can keep a secret", "I definitely won't sell all your data"])
Attached are two images. One from the simulator with the erroneous spacing and one from the canvas view, without. Any ideas? It might just be an Xcode bug.