Commit aa8e34c7 authored by hengrui's avatar hengrui

【feat】相册中选择照片时,刚进入照片album中,没有滚动到底部的偶现问题修复.

【影响范围】相册选择
【风险评估】低
【是否自测】是
parent 6ce75207
......@@ -886,6 +886,7 @@ static CGFloat itemMargin = 5;
- (void)prepareScrollCollectionViewToBottom {
if (_shouldScrollToBottom && _models.count > 0) {
// try fix #1562:https://github.com/banchichen/TZImagePickerController/issues/1562
/*
if (@available(iOS 15.0, *)) {
[_collectionView performBatchUpdates:^{} completion:^(BOOL finished) {
[self scrollCollectionViewToBottom];
......@@ -895,6 +896,16 @@ static CGFloat itemMargin = 5;
[self scrollCollectionViewToBottom];
});
}
*/
// iOS 15.6.1 - 凤梨手机相册没有滚动到底的问题。偶现的没有滚动到底部
__weak typeof(self) weakSelf = self;
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.03 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[weakSelf.collectionView performBatchUpdates:^{
[weakSelf scrollCollectionViewToBottom];
} completion:^(BOOL finished) {
}];
});
} else {
_collectionView.hidden = NO;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment