Skip to content

Support iOS 26 soft scroll edge effects in CalendarViewRepresentable #347

Description

@ikeval

Description

CalendarViewRepresentable does not reliably support the iOS 26 soft scroll-edge effect when embedded in a SwiftUI NavigationStack.

Applying .scrollEdgeEffectStyle(.soft, for: .top) to the representable still produces a hard navigation-bar edge. After scrolling far enough through past months, the navigation-bar background can disappear completely. The title and toolbar items remain visible, but calendar content is then shown directly behind them.

This reproduces in a minimal view without custom calendar item views or overlays.

Reproduction

import HorizonCalendar
import SwiftUI

struct CalendarTestView: View {
    @StateObject private var calendarProxy = CalendarViewProxy()

    var body: some View {
        NavigationStack {
            CalendarViewRepresentable(
                visibleDateRange: Date.distantPast...Date.now,
                monthsLayout: .vertical,
                dataDependency: nil,
                proxy: calendarProxy
            )
            .scrollEdgeEffectStyle(.soft, for: .top)
            .onAppear {
                calendarProxy.scrollToDay(
                    containing: .now,
                    scrollPosition: .centered,
                    animated: false
                )
            }
            .ignoresSafeArea()
            .navigationTitle("Calendar Test")
            .toolbar {
                ToolbarItem(placement: .primaryAction) {
                    Button("Add", systemImage: "plus") { }
                }
            }
        }
    }
}
  1. Present CalendarTestView.
  2. Scroll backward through past months.
  3. Observe the top navigation-bar edge and background.

Expected behavior

The soft top scroll-edge effect remains visible and stable while the calendar scrolls.

Actual behavior

The top edge remains hard, and the navigation-bar background can disappear entirely after scrolling through past months.

Environment

  • Xcode 26.6 (17F113)
  • iOS 26 Simulator
  • HorizonCalendar master revision 363088cc5d6930eb464d582493632882be6766fe

Additional context

CalendarViewRepresentable wraps CalendarView, whose internal scrolling view is a private CalendarScrollView. The SwiftUI modifier appears unable to configure that inner scroll view. It may help to apply topEdgeEffect.style = .soft internally on iOS 26 or expose a public configuration hook for the calendar scroll view.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions