Giter Club home page Giter Club logo

Comments (7)

gskbyte avatar gskbyte commented on August 17, 2024

Hi,

thanks for creating the issue! I just had a look and it happens because the tableview determines the top of the sticky section header view by using the contentInset, which is what the stretchy header is changing in the table view.

I will try to have a deeper look at it this afternoon and to be honest, I don't know if there is an easy/acceptable solution for this case, but as a workaround I would suggest you to use an UICollectionView because the headers in that case don't stick to the top.

Best regards

from gskstretchyheaderview.

gskbyte avatar gskbyte commented on August 17, 2024

I just stumbled upon this: http://stackoverflow.com/a/27562794/305582

It's a hack but it might also work.

from gskstretchyheaderview.

fabidona avatar fabidona commented on August 17, 2024

thank you, I found a workaround based on your link:

  • (void)scrollViewDidScroll:(UIScrollView *)scrollView {
    CGFloat sectionHeaderHeight = 50; //My Section Height

    if(scrollView.contentOffset.y >= -(_maximumScroll+sectionHeaderHeight) && scrollView.contentOffset.y <= -_minimumScroll) {
    scrollView.contentInset = UIEdgeInsetsMake(-scrollView.contentOffset.y, 0, 0, 0);
    }
    }

So the section header remains sticky until the scroll raise the minimum height that I want.
You can link minimumScroll and maximumScroll to stretchHeaderView properties maximumContentHeight e minimumContentHeight.

The overlap problem is still present.

from gskstretchyheaderview.

gskbyte avatar gskbyte commented on August 17, 2024

Hi Fabio,

thanks for your feedback. The overlap bug can be easily solved, I hope I have time between today and tomorrow to fix it. Thanks for your report!

from gskstretchyheaderview.

fabidona avatar fabidona commented on August 17, 2024

Great! This can help us ? http://stackoverflow.com/questions/2457663/uitableview-section-headers-drawing-above-front-subview

https://slack-files.com/T0EV6LREK-F0RF1RG4Q-7b3746d3e2

from gskstretchyheaderview.

gskbyte avatar gskbyte commented on August 17, 2024

Hi @fabidona, I opened a new PR for this. The exact lines are these: https://github.com/gskbyte/GSKStretchyHeaderView/pull/6/files#diff-182b1c9af8bcc3d785ea41d07bfe093bR130

from gskstretchyheaderview.

fabidona avatar fabidona commented on August 17, 2024

great! it works like a charm
thank you for support

from gskstretchyheaderview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.