Post

Replies

Boosts

Views

Activity

Buttons in toolbar change size after rendering
I have a view which is navigated using a NavigationLink, and when the view loads the buttons in the toolbar start off very small. After the view has finished animating, about a second later, the button size changes to the size it should be. The images at the bottom show the initial size of the Edit button and then the size after it has resized itself. This happens with image buttons too. I have been able to reproduce it in a new project with the following code: ContentView struct ContentView: View {     var body: some View {         NavigationView {             NavigationLink(destination: DetailView()) {                 Text("Navigate")             }         }         .navigationTitle("Recipes")     } } DetailView struct DetailView: View {     var body: some View {             Text("Detail view")             .navigationTitle("Detail")             .toolbar {                 ToolbarItem(placement: .navigationBarTrailing) {                         Button("Edit") { }                 }             }     } }
0
0
335
Dec ’21