PaoloCuscela / Cards

Awesome iOS 11 appstore cards in swift 5.
MIT License
4.2k stars 273 forks source link

Hide Status bar for DetailViewController #27

Closed JDSX closed 6 years ago

JDSX commented 6 years ago

When transitioning to fullscreen mode I have hidden the status bar, however the scroll view still appears 20px from the top.

I have set the following properties

    scrollView.frame.origin.y = 0

    if isFullscreen {
        scrollView.frame = view.frame

    }

However there's still white space like so

screen shot 2017-11-24 at 00 40 40
PaoloCuscela commented 6 years ago

Right now I can't figure out why this happens. Probably because of safe area insets, but it looks really strange cause snapshotView and blurView take whole screen ignoring these insets.

If you print view and scrollView's frame just after setting scrollView.frame = view.frame it returns: View = ( 0, 0, width, height ) ScrollView ( 0, 45, width, height )

cyrilzakka commented 6 years ago

In DetailViewController for iOS 11, set scrollView.contentInsetAdjustmentBehavior = .never.

PaoloCuscela commented 6 years ago

Thanks, updated.