-
Notifications
You must be signed in to change notification settings - Fork 42
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
头部高度变化如何更新 #4
Comments
简单一点在 AquamanPageViewController.swift 中添加一个方法 public func updateHeaderView() {
headerViewHeight = headerViewHeightFor(self)
headerViewConstraint?.constant = headerViewHeight
} 然后 override func pageController(_ pageController: AquamanPageViewController, mainScrollViewDidScroll scrollView: UIScrollView) {
print(scrollView.contentOffset)
headerViewHeight -= scrollView.contentOffset.y
updateHeaderView()
} 不过你需要考虑的是 scrollView.contentOffset 同时也在变化 |
还有一个问题,menuViewPinHeight这个参数我理解上应该是对menuView吸附效果做一个附加偏移,我看Demo中这个值传了一个导航栏的高度,能不能在库里实现对safeArea的适配? |
谢谢你的意见,后续我会考虑优化 |
已经实现 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
HeaderView的高度会随着操作发送变化,怎么动画顺滑地更新高度?
The text was updated successfully, but these errors were encountered: