Skip to content

Commit

Permalink
[ios | feat] iOS15 adapter for list (alibaba#3263)
Browse files Browse the repository at this point in the history
Link: https://code.aone.alibaba-inc.com/weex/weex/codereview/6919536

* [ios | feat] iOS15 adapter for list

1.  header extra padding
2. cell in list may disappear
  • Loading branch information
Txink authored Nov 15, 2021
1 parent c36d713 commit da91213
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ios/sdk/WeexSDK/Sources/Component/WXListComponent.mm
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,14 @@ - (void)viewDidLoad
_tableView.estimatedRowHeight = 0;
_tableView.estimatedSectionFooterHeight = 0;
_tableView.estimatedSectionHeaderHeight = 0;

#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 150000)
/// __IPHONE_15_0 Adaptation
if (@available(iOS 15.0, *)) {
_tableView.prefetchingEnabled = false;
_tableView.sectionHeaderTopPadding = 0;
}
#endif
}

- (void)viewWillUnload
Expand Down

0 comments on commit da91213

Please sign in to comment.