17.8 C
Canberra
Thursday, June 11, 2026

ios – SwiftUI again button chevron glitches with a bounce animation when .toolbarRole(.editor) is used and Liquid Glass is disabled


I’ve a brand-new SwiftUI app during which I’ve opted out of the Liquid Glass redesign by including UIDesignRequiresCompatibility = YES to my Information.plist.

On a element display pushed onto a NavigationStack, I apply .toolbarRole(.editor) so the again button reveals solely the chevron (with out the earlier display’s title textual content subsequent to it). With that modifier, the again button chevron performs a glitchy animation in the course of the push transition: once I arrive on the element display, the chevron animates downward, then again up, and eventually settles into its right place within the top-leading nook.

Here’s a quick video exhibiting the glitchy again button animation:
https://imgur.com/a/ZImV3rp

What I’ve noticed / tried

  • The glitch solely occurs when Liquid Glass is disabled. If I set UIDesignRequiresCompatibility = NO (so the app makes use of the brand new Liquid Glass design), the again button transition is completely easy.

  • Eradicating .toolbarRole(.editor) makes the glitch go away, however then the again button reveals the earlier display’s title textual content, which is precisely what I am attempting to keep away from.

  • The glitch additionally does not occur if the dad or mum view’s title is inline as a substitute of enormous: setting .navigationBarTitleDisplayMode(.inline) on ParentView (reasonably than .massive) leads to a easy again button transition.

  • It reproduces within the Xcode Preview, the Simulator, and on a bodily system.

struct ParentView: View {
    @State personal var path = NavigationPath()

    var physique: some View {
        NavigationStack(path: $path) {
            Textual content("HI")
                .navigationTitle("My Objects")
                .navigationDestination(for: String.self) { route in
                    swap route {
                    case "View2":
                        DetailView()
                    default:
                        EmptyView()
                    }
                }
                .navigationBarTitleDisplayMode(.massive) 
                .toolbar {
                    ToolbarItem(placement: .topBarTrailing) {
                        Button {
                            path.append("View2")
                        } label: {
                            Picture(systemName: "plus")
                        }
                    }
                }
        }
    }
}

struct DetailView: View {
    var physique: some View {
        Textual content("Element View")
            .navigationTitle("Element Display screen")
            .toolbarRole(.editor)
    }
}

Surroundings

  • Xcode 26.5

  • Minimal deployment goal: iOS 26

  • UIDesignRequiresCompatibility = YES (Liquid Glass disabled). Setting it to NO makes the issue disappear.

  • Reproduced on Xcode Preview, Simulator, and an actual system.

Query

Why does .toolbarRole(.editor) trigger the again button chevron to animate/glitch in the course of the push transition solely when Liquid Glass is disabled (UIDesignRequiresCompatibility = YES) and the dad or mum title is .massive, and the way can I preserve the chevron-only again button with out triggering this animation glitch?

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

[td_block_social_counter facebook="tagdiv" twitter="tagdivofficial" youtube="tagdiv" style="style8 td-social-boxed td-social-font-icons" tdc_css="eyJhbGwiOnsibWFyZ2luLWJvdHRvbSI6IjM4IiwiZGlzcGxheSI6IiJ9LCJwb3J0cmFpdCI6eyJtYXJnaW4tYm90dG9tIjoiMzAiLCJkaXNwbGF5IjoiIn0sInBvcnRyYWl0X21heF93aWR0aCI6MTAxOCwicG9ydHJhaXRfbWluX3dpZHRoIjo3Njh9" custom_title="Stay Connected" block_template_id="td_block_template_8" f_header_font_family="712" f_header_font_transform="uppercase" f_header_font_weight="500" f_header_font_size="17" border_color="#dd3333"]
- Advertisement -spot_img

Latest Articles