Currently, if I try to type in a TextField nested twice within a List then Detail View, my app crashes with the error: Thread 1: signal SIGABRT and in the debugger (abbreviated):
Here's the code that leads to this error.
Is there a way around this? If I remove the TabView then it works just fine. I need the TabView though, so is there a way I can pop out of the TabView then render a Detail View outside of TabView?
Code Block CoreSimulator --- Device: iPhone 8 (---) - Runtime: iOS 14.4 (----) - DeviceType: iPhone 8 AttributeGraph precondition failure: invalid size for indirect attribute: 73 vs 1.
Here's the code that leads to this error.
Code Block struct RootView { var body: some View { TabView { ListView() .tag(0) } } } struct ListView { @State var isActive = false var body: some View { NavigationView { NavigationLink(destination: DetailView(), isActive: $isActive) } } } struct DetailView { ... var body: some View { TextField("Keyboard appears and the app crashes.", text: $text) } }
Is there a way around this? If I remove the TabView then it works just fine. I need the TabView though, so is there a way I can pop out of the TabView then render a Detail View outside of TabView?