From 8cf3513aea2a67f237d60e2e5aad96f94bfc3679 Mon Sep 17 00:00:00 2001 From: wqyfavor Date: Tue, 20 Nov 2018 13:31:31 +0800 Subject: [PATCH] [iOS] Forbid adjustment of safeArea by system for cycle slider component. (#1780) --- ios/sdk/WeexSDK/Sources/Component/WXCycleSliderComponent.mm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ios/sdk/WeexSDK/Sources/Component/WXCycleSliderComponent.mm b/ios/sdk/WeexSDK/Sources/Component/WXCycleSliderComponent.mm index 402e592c7a..ab26bc3655 100644 --- a/ios/sdk/WeexSDK/Sources/Component/WXCycleSliderComponent.mm +++ b/ios/sdk/WeexSDK/Sources/Component/WXCycleSliderComponent.mm @@ -73,6 +73,9 @@ - (id)initWithFrame:(CGRect)frame _currentIndex = 0; _itemViews = [[NSMutableArray alloc] init]; _scrollView = [[WXRecycleSliderScrollView alloc] init]; + if (@available(iOS 11.0, *)) { + _scrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; + } _scrollView.backgroundColor = [UIColor clearColor]; _scrollView.delegate = self; _scrollView.showsHorizontalScrollIndicator = NO;