On iPhone Duo, when I use .environment(\.layoutDirection, .rightToLeft) for a navigation view, the toolbar items sometimes appear on the left side instead of the right side, below the camera. This results in a view with two sides, and in some cases, it displays in an unexpected place. For example, in the code below, the button is placed behind the camera, as shown in the attachment.
NavigationSplitView {
Text("Sidebar")
.toolbar {
ToolbarItem(placement: .cancellationAction) {
Button("X", systemImage: "xmark", action: {})
}
}
} detail: {
Text("Detail")
}
.environment(\.layoutDirection, .rightToLeft)
Is this intended behavior for RTL layout direction, a known issue, or a simulator issue?