Skip to content

iOS 11 Header problem #63

Closed
Closed

Description

@victorpierre789

Hi,
There is a small problem with GSKStretchyHeaderView on iOS 11, above the tableview there is a blank space, how to fix the problem is urgent for me. Can you help me ? Thanks
Watch the screenshots :

simulator screen shot - iphone 8 - 2017-09-26 at 13 45 55
simulator screen shot - iphone 8 - 2017-09-26 at 13 49 26

Activity

  1. mrhaxic commented on Sep 26, 2017

    @mrhaxic

    This should be solved by the following option for UIScrollView

    scrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;

  2. victorpierre789 commented on Sep 26, 2017

    @victorpierre789
    Author

    @mrhaxic It works. Thank you very much my friend, you have an idea to solve a problem related to iPhone X ?

    simulator screen shot - iphone x - 2017-09-26 at 14 02 00

  3. gskbyte commented on Sep 26, 2017

    @gskbyte
    Owner

    Nice, I love all these hacks Apple introduces with every new iOS version :)

    I'll update the examples and everything to improve the behaviour on iOS 11 as soon as the CI supports it!

  4. gskbyte commented on Sep 26, 2017

    @gskbyte
    Owner

    @victorpierre789 for that model specifically, you might need to make some adjustments to the layout... I will try to make the library work better with iOS 11 this week so all these hacks are not needed

  5. victorpierre789 commented on Sep 26, 2017

    @victorpierre789
    Author

    @gskbyte Okay thanks :)

  6. nablavector commented on Oct 2, 2017

    @nablavector

    Hi gskbyte, any news for us ?? 👍 🥇

  7. gskbyte commented on Oct 2, 2017

    @gskbyte
    Owner

    I have found a couple of issues with iOS 11, however, I'm working on it: #64

    Feel free to have a look at the PRs I will open!

  8. gskbyte commented on Oct 2, 2017

    @gskbyte
    Owner

    After enabling compatibility with Xcode 9 I will try to fix these problems with iOS11 without altering the API of the header view, but I can't promise anything, this looks harder than I initially thought.

  9. suyashb734 commented on Oct 5, 2017

    @suyashb734

    @gskbyte
    Have you been able to look into the issues in xcode 9 and iOS 11? Would be great if you can update us whether you are fixing it.

  10. gskbyte commented on Oct 5, 2017

    @gskbyte
    Owner

    Hi,

    I just had time to setup the project on Xcode 9 and make the build pass on the CI, I will try to invest more time this weekend and ideally come up with a general solution that works well on both iPhone 8 and X, respecting the safeAreaInsets. But take into account that this can take me several days.

    In the meanwhile, if it's enough for you, use the header view as in the example "below the navigation bar", that works as expected in all systems if contentInsetAdjustmentBehavior = .never

    Any help is more than welcome :)

    Best regards

  11. suyashb734 commented on Oct 11, 2017

    @suyashb734

    @gskbyte In UICollectionView the Section Headers (UICollectionReusableView) appear on top of the GSKStretchyHeaderView. This seems like the view hierarchy has changed in iOS 11.
    Is there any way you know that this could be solved?

  12. VitriOSX commented on Oct 11, 2017

    @VitriOSX

    @gskbyte I also faced this problem. It is very strange behavior as reported by @suyashb734
    simulator screen shot - iphone 7 - 2017-10-11 at 14 34 26

  13. gskbyte commented on Oct 18, 2017

    @gskbyte
    Owner

    Hello!

    I think I have fixed the issues, at least partially. I have opened the following PR: #68

    The way to stop iOS 11 messing up with the contentInsets is to do the following:

        if (@available(iOS 11.0, *)) {
            self.collectionView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
        }

    However, this is not a very good solution for the iPhone X and you may require some manual adjustments for that case, like setting a bigger maximumContentHeight for it and adjusting the layout of the header view contents.

    And the issue with the collection view headers is know on iOS 11: http://www.openradar.me/34308893. I have implemented a little hack to solve it.

    Please have a look at the PR, I will merge it this afternoon and will release a patch version.

    To fix the problems with the notch and the iPhone X I think I will need some major refactor for the header view that might not be backwards compatible. Managing the adjusted contentInset is not possible using KVO anymore and this makes the whole concept of the header view more complicated.

    I'll keep you posted!

  14. EgorkZe commented on Jun 17, 2019

    @EgorkZe

    I still get this issue with iOS 12 and iPhone X, minimumContentHeight doesn't work, stretch Factor ends on not zero value.
    Just now checked on iPhone 8, and the behaviour also weird. I set minContentHeight to 0, but header not going to be 0.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions