21.7 C
Canberra
Tuesday, October 21, 2025

iOS 26: Scroll indicator falls outdoors .popover content material


When exhibiting a popover:

struct ValueRowView<Content material: View, PopoverContent: View> : View
{
    let label: String
    let worth: Content material
    @State non-public var showPopover: Bool = false
    let popoverContent: PopoverContent?

    init(label: String, worth: Content material, @ViewBuilder popoverContent: () -> PopoverContent? = { nil })
    {
        self.label = label
        self.worth = worth
        self.popoverContent = popoverContent()
    }

    var physique: some View
    {
        HStack
        {
            VStack(alignment: .main)
            {
                Textual content(label)
                    .font(.footnote)
                    .foregroundColor(.grey)

                worth
            }

            Spacer()

            if let popoverContent
            {
                Button(motion:
                {
                    showPopover.toggle()
                })
                {
                    Picture(systemName: "information.circle")
                        .foregroundColor(.accentColor)
                }
                .popover(isPresented: $showPopover, attachmentAnchor: .level(.heart))
                {
                    ScrollView //TODO: Exhibits scroll indicator in popover arrow; iOS 26 bug?
                    {
                        popoverContent
                            .fixedSize(horizontal: false, vertical: true)
                            .padding()
                            .presentationCompactAdaptation(.popover)
                    }
                    .body(width: UIDevice.present.userInterfaceIdiom == .cellphone ? 270 : 400)
                }
            }
        }
    }
}

extension ValueRowView the place PopoverContent == EmptyView
{
    init(label: String, worth: Content material)
    {
        self.label = label
        self.worth = worth
        self.popoverContent = nil
    }
}

The scroll indicator is not seen subsequent to the scrolled content material. As an alternative it runs outdoors the popover and exhibits up on the popover arrow/triangle (see picture).

Learn how to stop this?

iOS 26: Scroll indicator falls outdoors .popover content material

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