Post

Replies

Boosts

Views

Activity

Set .bottomBar and .status placement for ToolbarItem in SwiftUI cased wired swipe to back behavior
Click Button and use swipe to back at pushed screen's left edge, keep finger in screen middle a bit, means don't finish the swipe back gesture, able to see first screen's navigation bar and title already moved. If keep the finger in middle then cancel the gesture, first screen's title and navigation item will be in second screen. import SwiftUI @main struct TestApp: App { var body: some Scene { WindowGroup { NavigationStack { List { NavigationLink("NavigationLink") { Text("Text") .navigationTitle("Text") } } .navigationTitle("navigationTitle") .toolbar { ToolbarItem(placement: .bottomBar) { Button("Button") { } } } } } } }
2
2
481
Sep ’23