1

I would like to hide the header of my scrollview.

I have a scrollview

//Contains everything inside the view
    let scrollView = UIScrollView()
    scrollView.alwaysBounceVertical = true
    scrollView.translatesAutoresizingMaskIntoConstraints = false
    scrollView.showsHorizontalScrollIndicator = false

which spans across the whole width and height of my view. When scrolling down, a weird header appears and blocks a bit of the scroll view content. I would like to hide that overlay. The worst thing is, that in bright mode, the overlay is white. That clashes with my colors. How do I go about removing it?

Header

1 Answer 1

2

The overlay is the navigation bar - it appears as soon as you scroll. To hide it completely, you can set navigationController?.setNavigationBarHidden(true, animated: false). Or, you can pass in a transparent appearance for navigationController?.navigationBar.standardAppearance.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for the quick reply! Does what you said it would.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.