diff --git a/MemoryTree/CloudView.swift b/MemoryTree/CloudView.swift index 600ceb3..7342da2 100644 --- a/MemoryTree/CloudView.swift +++ b/MemoryTree/CloudView.swift @@ -25,14 +25,16 @@ struct CloudView: View { @Environment(\.dismiss) var dismiss var body: some View { - VStack { - ForEach(words, id: \.self) { word in - let count = countedWords[word, default: 1] - Text(word) - .font(fontForCount(count)) - .bold(count > 2) - } + var isFirst = true + words.reduce(Text("")) { cloud, word in + defer { isFirst = false } + let count = countedWords[word, default: 1] + let bullet = (isFirst ? Text("") : Text(" • ")) + return cloud + bullet + Text(word) + .font(fontForCount(count)) + .bold(count > 2) } + .multilineTextAlignment(.center) .frame(maxWidth: .infinity, maxHeight: .infinity) .edgesIgnoringSafeArea(.bottom) .background(Color.blue)