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

Add ScrollView in CustomHeader #18

Open
vinh-savvycom opened this issue Sep 22, 2015 · 2 comments
Open

Add ScrollView in CustomHeader #18

vinh-savvycom opened this issue Sep 22, 2015 · 2 comments

Comments

@vinh-savvycom
Copy link

Current If CustomHeader have image, app run perfect. But If I have a UIScrollView in CustomHeader and scrollview have many image (scroll horizontal image in scrollview), I can't scroll table from touch on CustomHeader. I debug and I see app don't call in funtion if I scroll from CustomHeader
-(void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context

Please help me check it.

@AugustRush
Copy link
Owner

You can look up a method called hitTest,may be it's helpful !
发自我的 iPhone

在 2015年9月22日,12:24,vinh-savvycom [email protected] 写道:

Current If CustomHeader have image, app run perfect. But If I have a ScrollView in CustomHeader and scrollview have many image (scroll horizontal image in scrollview), I can't scroll table from touch on CustomHeader. I debug and I see app don't call in funtion if I scroll from CustomHeader
-(void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context

Please help me check it.


Reply to this email directly or view it on GitHub.

@vinh-savvycom
Copy link
Author

override func hitTest(point: CGPoint, withEvent event: UIEvent?) -> UIView? {
let view = super.hitTest(point, withEvent: event)
if view == self.scrollView {
return nil
}
return view
}

I called hitTest in CustomHeader, I scroll down ok, but I can't scroll horizontal image in scrollview
Please help me

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