Post

Replies

Boosts

Views

Activity

Comment on Handling Multi-Sheet Presentation in SwiftUI for a Global Login System
I encountered the compilation error as mentioned earlier, but it looks like I was able to resolve it using the following approach: .sheet(isPresented: Binding<Bool>( get: { isShowingAI && !loginManager.isShowingLogin && !loginManager.isShowingLogout }, set: { newValue in if !newValue { isShowingAI = false } } ), content: { AIChatMessageListPage() }) So far, this approach seems to work well.
Topic: App & System Services SubTopic: General Tags:
Aug ’24
Comment on Handling Multi-Sheet Presentation in SwiftUI for a Global Login System
Here's how you can respond to the feedback in English: Thank you for the suggestion! I tried implementing the code you provided: .sheet(isPresented: $isShowingAI && !$loginManager.isShowingLogin && !$loginManager.isShowingLogout, content: { AIChatMessageListPage() }) However, I encountered a compilation error: Cannot convert value '$isShowingAI' of type 'Binding<Bool>' to expected type 'Bool', use wrapped value instead.
Topic: App & System Services SubTopic: General Tags:
Aug ’24