Hello everyone, I’m experiencing a visual issue when dismissing a sheet on iOS 26. I’m using the same implementation shown in the official Apple documentation. While testing, I noticed that some apps do not exhibit this behavior. However, when running this code on iOS 26, the issue consistently occurs. Issue description: The sheet dismisses abruptly A white screen briefly appears for a few milliseconds and then disappears This results in a noticeable visual glitch and a poor user experience I tested the exact same code on iOS 18, where the sheet dismisses smoothly and behaves as expected, without any visual artifacts. Has anyone else encountered this issue on iOS 26? Is this a known bug, or is there a recommended workaround? Any insights would be greatly appreciated. Thank you.
Bug apple Health
We'd need to see some code to see whether you've done something wrong, or at the very least a GIF showing the issue in action.
If supplying code, please use the formatting tools so that the code is readable.
//
// OnboardingContainerView.swift
// Worko
//
// Created by Rodrigo Soares on 20/12/25.
//
import SwiftUI
import SwiftData
/// Container que gerencia todo o fluxo de navegação do onboarding
struct OnboardingContainerView: View {
// MARK: - Properties
@Environment(AppStateManager.self) private var appState
@Environment(\.modelContext) private var modelContext
@State private var viewModel = OnboardingViewModel()
@State private var isHealthKitReady = false
// MARK: - Body
var body: some View {
ZStack {
WorkoColors.background.ignoresSafeArea()
// Content com transições
ZStack {
currentStepView
.transition(.creativeSlide(direction: viewModel.navigationDirection))
}
.animation(.spring(response: 0.6, dampingFraction: 0.8, blendDuration: 0), value: viewModel.currentStep)
// Controles fixos (header + botão)
if viewModel.currentStep != .completion {
controlsOverlay
}
}
.task {
await viewModel.requestHealthKitAuthorization()
isHealthKitReady = true
}
}
// MARK: - Current Step View
@ViewBuilder
private var currentStepView: some View {
switch viewModel.currentStep {
case .welcome:
WelcomeView()
case .gender:
GenderView(viewModel: viewModel)
case .age:
AgePickerView(viewModel: viewModel)
case .height:
HeightPickerView(viewModel: viewModel)
case .weight:
WeightPickerView(viewModel: viewModel)
case .objective:
ObjectiveView(viewModel: viewModel)
case .activityLevel:
ActivityLevelView(viewModel: viewModel)
case .trainingExperience:
TrainingExperienceView(viewModel: viewModel)
case .completion:
CompletionView(onFinishTapped: finishOnboarding)
}
}
// MARK: - Controls Overlay
@ViewBuilder
private var controlsOverlay: some View {
VStack {
// Header com botão voltar e progresso
if viewModel.currentStep != .welcome {
OnboardingHeaderView(
currentStep: viewModel.currentDisplayStep,
totalSteps: viewModel.totalSteps,
onBack: {
withAnimation {
viewModel.goBack()
}
}
)
}
Spacer()
// Botão de ação - desabilitado até HealthKit estar pronto na tela welcome
PrimaryButton(
title: viewModel.currentStep == .welcome ? "COMEÇAR" : "PRÓXIMO",
action: handleNextAction,
isEnabled: canProceed
)
.padding(.horizontal, WorkoSpacing.horizontalPadding)
.padding(.bottom, WorkoSpacing.bottomButtonPadding)
}
}
// MARK: - Computed Properties
/// Só permite prosseguir se HealthKit já carregou (na tela welcome)
private var canProceed: Bool {
if viewModel.currentStep == .welcome {
return isHealthKitReady
}
return viewModel.canProceedFromStep
}
// MARK: - Actions
private func handleNextAction() {
withAnimation {
if viewModel.currentStep == .welcome {
viewModel.startOnboarding()
} else {
viewModel.goToNext()
}
}
}
private func finishOnboarding() {
let profile = viewModel.saveProfile(modelContext: modelContext)
appState.completeOnboarding(profile: profile, modelContext: modelContext)
}
}
// MARK: - Preview
#Preview {
OnboardingContainerView()
.environment(AppStateManager())
.modelContainer(for: UserProfile.self, inMemory: true)
}