You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 :
@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
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.
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
@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?
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.
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 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.
Activity
mrhaxic commentedon Sep 26, 2017
This should be solved by the following option for UIScrollView
scrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;victorpierre789 commentedon Sep 26, 2017
@mrhaxic It works. Thank you very much my friend, you have an idea to solve a problem related to iPhone X ?
gskbyte commentedon Sep 26, 2017
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!
gskbyte commentedon Sep 26, 2017
@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
victorpierre789 commentedon Sep 26, 2017
@gskbyte Okay thanks :)
nablavector commentedon Oct 2, 2017
Hi gskbyte, any news for us ?? 👍 🥇
gskbyte commentedon Oct 2, 2017
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!
gskbyte commentedon Oct 2, 2017
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.
suyashb734 commentedon Oct 5, 2017
@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.
gskbyte commentedon Oct 5, 2017
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 = .neverAny help is more than welcome :)
Best regards
suyashb734 commentedon Oct 11, 2017
@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?
VitriOSX commentedon Oct 11, 2017
@gskbyte I also faced this problem. It is very strange behavior as reported by @suyashb734

gskbyte commentedon Oct 18, 2017
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
contentInsetsis to do the following: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
maximumContentHeightfor 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!
EgorkZe commentedon Jun 17, 2019
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.