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

在iphone8 plus上当header高度更改然后调用updateHeadView时,标题栏会下移 #127

Open
ZKhercules opened this issue Nov 14, 2024 · 1 comment

Comments

@ZKhercules
Copy link

BC945466-A5A1-4078-B80D-2BFF571B3068
C0D2E203-C78E-4136-B4ED-B4932CE30330
E4E6C223-9B56-4578-84E9-BF213DDCBD0C
大概每次下移1个像素,调用updateHeadView次数多了以后,标题栏会下移的特别夸张,可能是什么原因引起的?

@ZKhercules
Copy link
Author

原因找到了,在updateHeadeView之前给head重新设置的height是经过计算后的float值,将float使用(int)ceil(headerHeight)向上取整后赋值就可以了

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

1 participant