File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ - (void)_commonSetup
9898 self.layouterInterItemSpacing = 0 .0f ;
9999
100100 self.scrollView = [[SCScrollView alloc ] init ];
101- self.scrollView .autoresizingMask = UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
101+ self.scrollView .autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
102102 self.scrollView .showsVerticalScrollIndicator = NO ;
103103 self.scrollView .showsHorizontalScrollIndicator = NO ;
104104 self.scrollView .decelerationRate = UIScrollViewDecelerationRateFast;
@@ -119,7 +119,13 @@ - (void)viewDidLoad
119119 [self .view setAutoresizingMask: UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight];
120120
121121 [self .scrollView setFrame: self .view.bounds];
122- [self .view addSubview: self .scrollView];
122+
123+ // Prevents _adjustContentOffsetIfNecessary from triggering
124+ UIView *scrollViewWrapper = [[UIView alloc ] initWithFrame: self .view.bounds];
125+ [scrollViewWrapper setAutoresizingMask: UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight];
126+ [scrollViewWrapper addSubview: self .scrollView];
127+
128+ [self .view addSubview: scrollViewWrapper];
123129
124130 [self reloadData ];
125131}
You can’t perform that action at this time.
0 commit comments