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

横竖屏切换缓存有bug #392

Open
kukumaluCN opened this issue Jan 16, 2019 · 0 comments
Open

横竖屏切换缓存有bug #392

kukumaluCN opened this issue Jan 16, 2019 · 0 comments

Comments

@kukumaluCN
Copy link

kukumaluCN commented Jan 16, 2019

- (FDIndexPathHeightsBySection *)heightsBySectionForCurrentOrientation {
    return UIDeviceOrientationIsPortrait([UIDevice currentDevice].orientation) ? self.heightsBySectionForPortrait: self.heightsBySectionForLandscape;
}

在手机竖屏模式,平放在桌面上,此时[UIDevice currentDevice].orientation == UIDeviceOrientationFaceUp,会导致类似的逻辑取错缓存容器。
应该换用UIInterfaceOrientationIsPortrait([UIApplication sharedApplication].statusBarOrientation)才是正确的,但是在横竖屏切换瞬间,[UIApplication sharedApplication].statusBarOrientation这个取值也会有延迟。

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