diff --git a/demo/src/ListDemo.ts b/demo/src/ListDemo.ts index 9c037881..81e65d97 100644 --- a/demo/src/ListDemo.ts +++ b/demo/src/ListDemo.ts @@ -109,5 +109,6 @@ class ListPanel extends Panel { } it.bgColor = Color.WHITE }).in(rootView) + refreshView.bgColor = Color.YELLOW } } \ No newline at end of file diff --git a/demo/src/RefreshableDemo.ts b/demo/src/RefreshableDemo.ts index 211108be..0b967c01 100644 --- a/demo/src/RefreshableDemo.ts +++ b/demo/src/RefreshableDemo.ts @@ -102,6 +102,8 @@ class RefreshableDemo extends Panel { } as IVLayout)).apply({ layoutConfig: layoutConfig().atmost(), }) + }).apply({ + bgColor: Color.YELLOW }).in(rootView) } } \ No newline at end of file diff --git a/iOS/Pod/Classes/Refresh/DoricSwipeRefreshLayout.m b/iOS/Pod/Classes/Refresh/DoricSwipeRefreshLayout.m index 95c1f613..7f126026 100644 --- a/iOS/Pod/Classes/Refresh/DoricSwipeRefreshLayout.m +++ b/iOS/Pod/Classes/Refresh/DoricSwipeRefreshLayout.m @@ -18,6 +18,9 @@ - (instancetype)initWithFrame:(CGRect)frame { self.showsVerticalScrollIndicator = NO; self.alwaysBounceVertical = YES; self.delegate = self; + if (@available(iOS 11, *)) { + self.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; + } } return self; } @@ -28,6 +31,9 @@ - (instancetype)init { self.showsVerticalScrollIndicator = NO; self.alwaysBounceVertical = YES; self.delegate = self; + if (@available(iOS 11, *)) { + self.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; + } } return self; } @@ -80,9 +86,10 @@ - (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL - (void)scrollViewDidScroll:(UIScrollView *)scrollView { if (scrollView.contentOffset.y <= 0) { [self.swipePullingDelegate setProgressRotation:-scrollView.contentOffset.y / self.headerView.height]; - self.bounces = YES; + //self.bounces = YES; } else { - self.bounces = NO; + //self.bounces = NO; + //scrollView.contentOffset = CGPointMake(scrollView.contentOffset.x, 0); } }