forkingdog / forkingdog/UITableView-FDTemplateLayoutCell
横竖屏切换缓存有bug
Open
- Dominant language
- Objective-C
- Stars
- 9.9k
- Forks
- 2k
- PR merge metrics
- No merged PRs in 30d
Description
```objc
- (FDIndexPathHeightsBySection *)heightsBySectionForCurrentOrientation {
return UIDeviceOrientationIsPortrait([UIDevice currentDevice].orientation) ? self.heightsBySectionForPortrait: self.heightsBySectionForLandscape;
}
```
在手机竖屏模式,平放在桌面上,此时`[UIDevice currentDevice].orientation == UIDeviceOrientationFaceUp`,会导致类似的逻辑取错缓存容器。
应该换用`UIInterfaceOrientationIsPortrait([UIApplication sharedApplication].statusBarOrientation)`才是正确的,但是在横竖屏切换瞬间,`[UIApplication sharedApplication].statusBarOrientation`这个取值也会有延迟。
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.