Hi,
I'm trying to sort an array of organization names and phone numbers. When I try to use the normal sort() command, I get the error:
"Consecutive declarations on a line must be separated by ';'"
Here's my code (it's for the Apple Watch) but I am also trying to sort on an iPhone and get the same error.
import SwiftUI
struct ContentView: View {
var choices = ["National Center for Missing and Exploted Children\n1-800-422-4453","National Domestic Violence Hotline\n1-800-799-7233","National Parents Hotline\n1-855-427-2736", "National Runaway Safeline\n1-800-786-2929"]
var body: some View {
List {
ForEach(self.choices, id: \.self) { Options in
Text(Options)
.fontWeight(.bold)
.font(.caption)
.foregroundColor(Color .black)
.frame(height:110)
.listRowPlatterColor(Color.white)
}
}
.listStyle(CarouselListStyle())
.navigationBarTitle(Text("Child Abuse Phone"))
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
Group {
ContentView()
.previewDevice("Apple Watch Series 4")
}
}
}
}
Thanks for any help,
Dan Uff