File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
tns-core-modules/ui/list-view Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import { StackLayout } from "../layouts/stack-layout";
8
8
import { ProxyViewContainer } from "../proxy-view-container" ;
9
9
import { ios } from "../../utils/utils" ;
10
10
import { profile } from "../../profiling" ;
11
+ import { device } from "../../platform" ;
11
12
12
13
export * from "./list-view-common" ;
13
14
@@ -204,6 +205,17 @@ class UITableViewRowHeightDelegateImpl extends NSObject implements UITableViewDe
204
205
}
205
206
}
206
207
208
+ // TODO: Remove this declaration when 'tns-platform-declarations' is update with iOS 11 declarations
209
+ declare const enum UIScrollViewContentInsetAdjustmentBehavior {
210
+ Automatic = 0 ,
211
+
212
+ ScrollableAxes = 1 ,
213
+
214
+ Never = 2 ,
215
+
216
+ Always = 3
217
+ }
218
+
207
219
export class ListView extends ListViewBase {
208
220
public _ios : UITableView ;
209
221
private _dataSource ;
@@ -222,6 +234,11 @@ export class ListView extends ListViewBase {
222
234
this . _ios . estimatedRowHeight = DEFAULT_HEIGHT ;
223
235
this . _ios . rowHeight = UITableViewAutomaticDimension ;
224
236
this . _ios . dataSource = this . _dataSource = DataSource . initWithOwner ( new WeakRef ( this ) ) ;
237
+ if ( parseInt ( device . sdkVersion ) >= 11 ) {
238
+ // TODO: Remove the cast to 'any' when 'tns-platform-declarations' is update with iOS 11 declarations
239
+ ( < any > this . _ios ) . contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentBehavior . Never ;
240
+ }
241
+
225
242
this . _delegate = UITableViewDelegateImpl . initWithOwner ( new WeakRef ( this ) ) ;
226
243
this . _heights = new Array < number > ( ) ;
227
244
this . _map = new Map < ListViewCell , View > ( ) ;
You can’t perform that action at this time.
0 commit comments