Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Header covers table view while cell is animating #13

Closed
Jackson0111 opened this issue Jun 14, 2016 · 8 comments
Closed

Header covers table view while cell is animating #13

Jackson0111 opened this issue Jun 14, 2016 · 8 comments

Comments

@Jackson0111
Copy link

Hi! Great work! I noticed something weird and haven't quite figured out a solution yet. I subclassed GSKStretchyHeaderView and added it to my table view. Everything works great but the header always covers table view cells during cell's animation (to be more specific, this is the table view animation I'm using: https://github.com/Ramotion/folding-cell). This only happens when header's height is smaller than its max height(aka, when scrolled up). It looks like this issue #5 but I'm not sure what exactly is causing this problem. Any ideas?

@gskbyte
Copy link
Owner

gskbyte commented Jun 14, 2016

Hi!

Well, this seems to actually be the opposite: in order to fix the issue #5 I implemented a fix to make the stretchy header stay always on top, probably disabling this might fix your issue. I will have to think of a better way to implement it or just make it configurable.

If you want to try it, just comment out the code to keep the stretchy header on top and if it works for you, you can even make a PR. I will have a look this weekend, or if I have time earlier this week.

Best regards

@Jackson0111
Copy link
Author

Not sure which part of the code I should block. Any clue? I will keep working on it, meanwhile, please let me know when you have some thoughts!

@gskbyte
Copy link
Owner

gskbyte commented Jun 14, 2016

Hi, this is the code responsible for that: https://github.com/gskbyte/GSKStretchyHeaderView/blob/master/Pod/Classes/GSKStretchyHeaderView.m#L139 I will try to have a look this afternoon :)

@Jackson0111
Copy link
Author

Just tried blocking that but didn't work. I can post my code and some screenshots if you'd like to see it, or you can add a header to https://github.com/Ramotion/folding-cell and see where the issue is. Let me know.

@Jackson0111
Copy link
Author

Also, you mentioned in another issue that the pull to refresh is already implemented. Can you point me to which function/block/property that performs this?

@gskbyte
Copy link
Owner

gskbyte commented Jun 16, 2016

Hi,

I just tested it with the folding cell example app and everything seems to work, without touching any code

ezgif-1404985282

I just added this to MainTableViewController.swift:

        let headerView = GSKStretchyHeaderView(frame: CGRectMake(0, 0, 320, 320))
        headerView.contentView.backgroundColor = UIColor.orangeColor()
        headerView.minimumContentHeight = 64
        self.tableView.addSubview(headerView)

Best regards

@gskbyte
Copy link
Owner

gskbyte commented Jun 19, 2016

I've implemented a new method to keep the header view on top of the table view, I hope it works better, although it seemed to work with the older implementation. I'm closing this issue for now.

@gskbyte gskbyte closed this as completed Jun 19, 2016
@Jackson0111
Copy link
Author

Still couldn't figure out what I might've done wrong, but thanks! I will try the new method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants