1
.actionSheet(isPresented: $showLocationOptions) {
    ActionSheet(title: Text("Which city/town is this place in ?"), message: Text("Select a location"), buttons: [

    .default(Text(location1)) {  },
    .default(Text(location2)) {  },
    .default(Text(location3)) {  },
    .default(Text(location4)) {  },
    .default(Text(location5)) {  },
    .destructive(Text("Cancel")){      
        }    
    ])
}
3
  • no you can't. you can only change all Alert button colors in your App: stackoverflow.com/questions/57347423/… Commented Feb 5, 2022 at 10:54
  • Give me any suggestions.. how will users know which button is selected currently. Commented Feb 5, 2022 at 12:32
  • The .actionSheet just offers different actions. You might want a Picker in a .sheet which shows the active selection and lets you pick another Commented Feb 5, 2022 at 13:11

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.