Is there any way to have no title section in an Action Sheet? The Action Sheet definition in the SwiftUI code is as follows:
public struct ActionSheet {
/// Creates an action sheet with the provided buttons.
public init(title: Text, message: Text? = nil, buttons: [ActionSheet.Button] = [.cancel()])
/// A button representing an operation of an action sheet presentation.
public typealias Button = Alert.Button
}
Since title only conforms to Text, I thought perhaps adding just Text("") would do the job; however, this instead keeps the space for the title empty, rather than removing it. Giving nil instead of Text("") also doesn't work.
Also, is there any way to give an Action Sheet's button a view, like with the following:
struct ActionItem: View {
var body: some View {
HStack {
Image(systemName: "phone")
Spacer()
Text("Call 1-408-123-4567")
}
}
}