Post

Replies

Boosts

Views

Activity

iOS 18 iPad Toolbar .principal Placement
Hi, I am having some spacing issues with the new TabViewStyle.sidebarAdaptable. My app uses @ToolBarContentBuilder for navigationBar elements as there are some custom design requirements. One of these is title text that is set in the principal position. Simplified example: var body: some View { Text("Body") .toolbar { toolbar() } } @ToolbarContentBuilder private func toolbar() -> some ToolbarContent { ToolbarItem(placement: placement) { Text("Title") } } Everything with this setup works fine till I use an iPad with iOS 18 where the new toggleable sidebar is present. Upon switching to the sidebar layout the title does not move to the space adjacent to the navigation button (where the tab bar just was) and instead remains in its own bar, below the rest of the navigation. I've noticed that when navigationTitle is set the the title set in toolbar() does appear in the right place. var body: some View { Text("Body") .toolbar { toolbar() } .navigationTitle("anything") } Is this expected behaviour? How can I achieve a single line nav bar with a title set this way? Happy to provide a sandbox app to reproduce this issue. Many thanks, Matt
0
0
90
2d