Post

Replies

Boosts

Views

Activity

Reply to Mac Catalyst 18 TabView selection binding broken
I'm having a similar issue. My TabView used to work on all platforms and it still does on iOS and iPadOS. However on macCatalyst clicking any tab will revert to the first tab on the TabView after a short while. The selection value will not be updated when clicking on a new tab. Setting the value programmatically works fine. The issue still persists when building with Xcode 16.1 beta 3. //storing selected tab in view struct enum UITab { case clip case charts } @State private var selectedUITab: UITab = .clip ... //the actual TabView in the view's body TabView(selection: self.$selectedUITab) { Tab("First Tab", image: "tab1", value: .clip) { FirstView() } Tab("Second Tab", image: "tab2", value: .charts) { SecondView() } //...etc }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’24