-
Crash in iOS 14.3 when using ForEachStore in TabView
struct AState: Equatable, Identifiable {
let uuid: UUID()
var id: String { uuid.uuidString }
}
struct BState: Equatable {
var aStates: IdentifiedArrayOf<AState> = []
@Bindable var selectedIndex: String = ""
...
}
enum BAction: BindableAction {
case aAction(String, AAction)
}
struct BView: View {
let store: <BState, BAction>
@ObservedObject private var viewStore: ViewStore<BState, BAction>
...
var body: some View {
TabView(selectIndex: viewStore.binding(\.$selectedIndex)) {
ForEachState(store.scope(\.aStates, action: /BAction.aAction)) {
}
}
}
} |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Hi @ACFancy, there isn't enough info here for us to see why there might be a crash. Can you provide a sample project that reproduces the problem? |
Beta Was this translation helpful? Give feedback.
-
This most likely has nothing to do with Composable Architecture. Instead, this crash will most likely have to do with the |
Beta Was this translation helpful? Give feedback.
-
SwiftUI TabView page style bug for iOS 14.xx, I using UIKit in SwiftUI to fixed that. |
Beta Was this translation helpful? Give feedback.
SwiftUI TabView page style bug for iOS 14.xx, I using UIKit in SwiftUI to fixed that.