You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a parent View with a TabView and a custom modifier to present a custom full modal view (doesn't exist in SwiftUI so custom work had to be done)
struct ContentView: View {
@ObservedObject private var tabData = MainTabBarData(initialIndex: 1, customItemIndex: 3)
var body: some View {
TabView(selection: $tabData.itemSelected){
// tab items with views and tags
}
.present($tabData.isCustomItemSelected, // Present the modal view when isCustomItemSelected @State is true
view: Widget(store: HostBroadcast.ViewModel(), content: BroadcastLiveView.init), // Using CombineFeedbackUI Widget passing the viewmodel and content view
// I need somehow to link the isPresented: $tabData.isCustomItemSelected so that I can toggle it from the BroadcastLiveView to close the modal, or if feasible signal from HostBroadcast.ViewModel the state change to MainTabBarData
style: .fade)
My BroadcastLiveView.init is following 0.7.0 tag source code examples.
I'd love to understand if this somehow can happen in ViewModel context, I have a Feedback where I check if the button to close the view tapped but I lack understanding how to tell the MainTabBarData ObservableObject that isCustomItemSelected should be false.
The text was updated successfully, but these errors were encountered:
I have a parent View with a TabView and a custom modifier to present a custom full modal view (doesn't exist in SwiftUI so custom work had to be done)
My BroadcastLiveView.init is following 0.7.0 tag source code examples.
I'd love to understand if this somehow can happen in ViewModel context, I have a
Feedback
where I check if the button to close the view tapped but I lack understanding how to tell theMainTabBarData
ObservableObject thatisCustomItemSelected
should be false.The text was updated successfully, but these errors were encountered: