maxep / MXParallaxHeader

Simple parallax header for UIScrollView
MIT License
1.73k stars 251 forks source link

Using MXParallaxHeader in UITableView with headers #65

Closed iDevo closed 5 years ago

iDevo commented 7 years ago

Hi there, I'd like to use MXParallaxHeader in my UITableView, which worked great until I started adding section headers. The section header anchor point seems to be at the end of the ParallaxHeader, so the section headers stop there. Moreover the passed headers are moving above the HeaderView.

Is there a way to change this behaviour or a workaround?

Thanks in advance!

mxissue

jyounus commented 7 years ago

I'm after the same functionality. Did you manage to solve this @iDevo?

maxep commented 7 years ago

The support of table view with sections have been removed because it removes the header touch on upward position, please refer to #40. As a workaround, you can embed your view controller in a MXScrollViewController, I havent tried yet but it should work.

Ilya-Pak commented 7 years ago

I did manage to make it work right by creating a scrollview and adding to it MXParallaxView and UITableView. But what I've notice is that when user start scrolling it accidently recongnize gesture as tap not swipe and calls actions like didSelectRow: I think it's because both delegates of scrollview and tableview are hinder each other. Do you have any ideas how to fix it?

And thanks a lot for this project! Great job!

HoanPH commented 7 years ago

I have the same issue with section header. In my case, i change table view style plain to group. After that, set heightForHeaderInSection, heightForFooterInSection in tableview delegate. The section header will not sticky when scroll. Hope this help!

leithonenglish commented 6 years ago

@maxep How would u go about embedding the viewController in in the MxScrollViewController

TrungTuyenTran commented 6 years ago

I create a MXScrollView and put collectionView into MXScrollView. Set scrollView.parallaxHeader.view is "babysuccess" UIImageView . It can resolved this problem . But It have a new problem, when I scroll to bottom of collectionView , I can keep scroll down although I set bounces for scrollView and collectionView is true.

janeshsutharios commented 5 years ago

i Solved by contentView.layer.zPosition = 1

minhchau273 commented 5 years ago

@janeshsutharios Which contentView did you mention above?

jeremypiednoel commented 5 years ago

@janeshsutharios Which contentView did you mention above?

tableView.parallaxHeader.contentView.layer.zPosition = 1

janeshsutharios commented 5 years ago

@jeremypiednoel @minhchau273 in MXParallaxHeader/MXParallaxHeader.m - (void)layoutContentView method . write objc c equivalent code ( tableView.parallaxHeader.contentView.layer.zPosition = 1) at bottom of function.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.