Comments (5)
简单一点在 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 同时也在变化
from aquaman.
from aquaman.
还有一个问题,menuViewPinHeight这个参数我理解上应该是对menuView吸附效果做一个附加偏移,我看Demo中这个值传了一个导航栏的高度,能不能在库里实现对safeArea的适配?
from aquaman.
谢谢你的意见,后续我会考虑优化
from aquaman.
还有一个问题,menuViewPinHeight这个参数我理解上应该是对menuView吸附效果做一个附加偏移,我看Demo中这个值传了一个导航栏的高度,能不能在库里实现对safeArea的适配?
已经实现
from aquaman.
Related Issues (8)
- No such module 'Aquaman' HOT 3
- How to scroll to top? HOT 9
- 在真机11,系统14.5的真机上,在有无导航栏的情况下,contentScrollView滑动的时候,直接整个界面滑到顶部了,记录不了每个childScrollView滑动的高度 HOT 3
- mainScrollView手势和childScrollView手势冲突 HOT 3
- 大哥,bug来了,1.快速左右滑动闪退;2.上下多次滑动, current contentScrollView会出现偏移值不准确 HOT 6
- 請問要如何得到真正的contentOffset? HOT 2
- Crash report HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aquaman.