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

YPNavigationBarBackgroundStyleOpaque下控制器添加UIView,侧滑(pop)返回时View的Y坐标会出现偏移效果 #37

Open
edocx opened this issue May 22, 2019 · 2 comments

Comments

@edocx
Copy link

edocx commented May 22, 2019

我在您的demo中(YPNavigationBarConfigurations = YPNavigationBarBackgroundStyleOpaque),给YPDemoViewController添加一个subView,比如:frame(0,0,100,100),当侧滑或者pop的返回的时候,subView的Y左边会出现偏移一个导航栏+状态栏高度的效果。

@yiplee
Copy link
Owner

yiplee commented May 22, 2019

@cavanlee
Copy link

ScrollView 跳动问题 在转场过程中,navigationBar 的 translucent 属性可能发生了改变, 然后导致了 scrollView 的 frame 和 contentInset 发生改变,页面展示内容位置变化。如果遇到这种情况,建议设置对应 controller 的 extendedLayoutIncludesOpaqueBars (IB 里面的 under opaque bar) 为 YES,即可避开这个问题。
这样虽然能避开Y轴坐标系发生变化导致的跳动,但是 TableView SectionHeader 就没有悬浮效果了。

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

3 participants