页: 1 具备以下法律:
struct ProfileView: View {
@ObservedObject var loginViewModel: LoginViewModel
@State private var showLogoutOptions = false
var body: some View {
NavigationView {
VStack {
}
.toolbar {
ToolbarItem(placement: .topBarLeading) {
LogoutButton(showLogoutOptions: $showLogoutOptions)
}
}
.actionSheet(isPresented: $showLogoutOptions) {
ActionSheet(
title: Text("Settings"),
message: Text("What you want to do?"),
buttons: [
.destructive(
Text("Sign Out"),
action: loginViewModel.handleSignOut
), .cancel()
]
)
}
} }
}
struct LogoutButton: View {
@Binding var showLogoutOptions: Bool
var body: some View {
Button {
showLogoutOptions = true
} label: {
Image(systemName: "gear")
.font(.system(size: 24))
.bold()
.foregroundStyle(.black)
}
}
}
而当驳回行动表时,显示的行踪再次是错误的。 因此,我是否认为在驳回行动单或另一项选择在内部运作时会重新恢复?
I tried to read apple s documentation but found nothing about it.