19.2 C
Canberra
Monday, March 2, 2026

SwiftUI IOS 26 – Menu button floats exterior its container throughout choice animation


Do not even know how you can clarify this…
On IOS 26, in a scrollable view that incorporates a Menu, if I begin scrolling the view earlier than the menu choice animation finishes (roughly inside ~1 second after tapping an choice), the Menu icon briefly mispositions: it shifts relative to its container and seems to “float” exterior of the format bounds. As soon as the animation completes or scrolling stops, it snaps again, however through the interplay the button is visibly indifferent from the container/alignment.

This isn’t anticipated conduct proper?? That is occurring in each menu in my mission, even in menus utilized in a toolbar of a sheet, when dragging the sheet after choice, the identical drawback happens. I hooked up some gifs of various instances.

SwiftUI IOS 26 – Menu button floats exterior its container throughout choice animation

Reproduction in swiftui app
Pattern for testing:

import SwiftUI

struct ContentView: View {
    personal let objects = (1...30).map { "Merchandise ($0)" }

       var physique: some View {
           NavigationStack {
               ScrollView {
                   LazyVStack(alignment: .main, spacing: 12, pinnedViews: []) {
                       HStack {
                           Textual content("Scrollable header")
                               .font(.headline)

                           Spacer()

                           Menu {
                               Button("Choice 1") {
                                   // deal with choice 1
                               }
                               Button("Choice 2") {
                                   // deal with choice 2
                               }
                           } label: {
                               Picture(systemName: "ellipsis.circle")
                                   .imageScale(.giant)
                                   .padding(8)
                           }
                           .menuStyle(.button)
                           .buttonStyle(.plain)
                           .accessibilityLabel("Extra choices")
                       }
                       .padding(.horizontal)
                       .padding(.prime, 8)

                       ForEach(objects, id: .self) { merchandise in
                           Textual content(merchandise)
                               .body(maxWidth: .infinity, alignment: .main)
                               .padding(.horizontal)
                               .padding(.vertical, 12)
                               .background(.background)
                               .overlay(alignment: .backside) {
                                   Divider()
                               }
                       }
                   }
               }
               .navigationTitle("Objects")
               .background(Shade(.systemGroupedBackground))
           }
       }
}

#Preview {
    ContentView()
}

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