exyte / ScalingHeaderScrollView

A scroll view with a sticky header which shrinks as you scroll. Written with SwiftUI.
MIT License
1.15k stars 82 forks source link

Issues when presented as .pageSheet #6

Closed adamdahan closed 2 years ago

adamdahan commented 2 years ago

Hi all,

Neat library, thanks for building it. I found some issues with the implementation. If you have a UIKit based app and want to present one of the examples inside of a nav with a modelPresentationStyle of .pageSheet with code like this:

 @objc func presentOnboarding() {
        let onboardingViewController = UIHostingController(rootView: OnboardingView())
        let nav = UINavigationController(rootViewController: onboardingViewController)
        nav.modalPresentationStyle = .pageSheet

        if let sheet = nav.sheetPresentationController {
            sheet.detents = [.medium(), .large()]
        }
        present(nav, animated: true, completion: nil)
    }

You get this result (this is based off your ColorScalingHeader example). Simulator Screen Recording - iPhone 13 - 2022-06-08 at 10 19 46

Let me know if I can help further.

f3dm76 commented 2 years ago

Hey @adamdahan, could you please share a code of how you create this image? If you are using Nuke it might be because of that...