English 中文(简体)
是否在迅速填写行动表时重新提出看法?
原标题:Is View recreated when i close an action sheet in swiftUI?

页: 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.

问题回答

这一观点不必再提出。 这是因为有约束力的机制,在这种情况下,是<编码>how示例>。 @State. 请见。 列报:. 这意味着,在提出/发出行动指示时,它将对<条码>how射/代码>具有约束力。 您可尝试在使用<代码>时删除一些节点。 它每次改变时都会回顾这些法典。

Is View recreated when i close an action sheet in swiftUI?

第一类“选择行动表”是指在行动表中选择“Cancel”。 页: 1 这样做确实是有理由的。

然后,我们需要说明“意见”究竟是什么意思。

Do you mean ProfileView.init is called? We can t be sure. It is not guaranteed that SwiftUI will call your init, nor is it guaranteed that it won t.

您是否意味着<条码>ProfileView. . . .one? 参看你如何通过<代码>$showlogoutOptions(在行动单被否决后改动)至LogoutButton,ProfileView.one,可能再次评价中的任何内容。 需要更新LogoutButton(在这种情况下有t)。

或者说,你指的是海道和航道:on Screen向不同的纽吨和航海条改动? 它们可能不会改变。 页: 1 UI公司将“ProfileView.one最后一次重新调整,与当时回过来的情况进行比较,发现除了驳回诉讼单外,实际上没有任何变化,因此它赢得了新的顿子或新的航道。





相关问题
SwiftUI: How do I position a button x points above a sheet?

I am trying to recreate a Maps-style UI with a persistent bottom sheet and controls fixed above. Apple Maps UI with controls above ☝️ Example here, the "Look Around" binoculars button and ...

BraintreeDropIn deprecated functions error

I m getting this error on the latest release of BraintreeDropIn, I really don t get it since based on the patch notes, this should ve been addressed already, I have already tried cleaning derived data,...

how to limit zoom level in map swift ui?

how to limit zoom level in map swift ui i have map and need to make zoom level limited Map(coordinateRegion: $region,annotationItems: viewModel.nearbyGyms) { item in ...

UIImageView - How to get the file name of the image assigned?

Is it possible to read the name of an UIImageView s UIImage that s presently stored in the UIImageView? I was hoping you could do something kind of like this, but haven t figured it out. NSString *...

热门标签