Post

Replies

Boosts

Views

Activity

Reply to NavigationSplitView's toolbar item disappears on resize
I've noticed that this problem occurs as soon as selectedId gets set a value, then persists even if I remove the selection. This modified example shows that as long as the selected id does not get set, everything works as expected. When you select tap "Option", the selection is set, and my problem occurs as shown in the video above. Even if I remove the selection by tapping "Unselect", the problem still persists. @State var selectedId: String? = nil NavigationSplitView { List(selection: $selectedId) { NavigationLink("Sidebar", value: "test") Button("Unselect") { selectedId = nil } } } detail: { Text("Detail") .toolbar { Button("Button") {} } }
Oct ’24
Reply to Button icon in List to match style?
I understand that the buttons inherit their style from the list, but I honestly believe that the default behavior looks really odd; a normal destructive button in a list looks like this: Is there really no other way to have buttons keep their style, without individually setting an explicit .foregroundStyle(…) to color the icons? In my code example above I have the smallest possible example to describe my issue. In our app we rely on Lists – I can't switch to a ScrollView there.
Oct ’24