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";
88import { ProxyViewContainer } from "../proxy-view-container" ;
99import { ios } from "../../utils/utils" ;
1010import { profile } from "../../profiling" ;
11+ import { device } from "../../platform" ;
1112
1213export * from "./list-view-common" ;
1314
@@ -204,6 +205,17 @@ class UITableViewRowHeightDelegateImpl extends NSObject implements UITableViewDe
204205 }
205206}
206207
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+
207219export class ListView extends ListViewBase {
208220 public _ios : UITableView ;
209221 private _dataSource ;
@@ -222,6 +234,11 @@ export class ListView extends ListViewBase {
222234 this . _ios . estimatedRowHeight = DEFAULT_HEIGHT ;
223235 this . _ios . rowHeight = UITableViewAutomaticDimension ;
224236 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+
225242 this . _delegate = UITableViewDelegateImpl . initWithOwner ( new WeakRef ( this ) ) ;
226243 this . _heights = new Array < number > ( ) ;
227244 this . _map = new Map < ListViewCell , View > ( ) ;
You can’t perform that action at this time.
0 commit comments