refactor: delete isContentScrollable function

BREAKING CHANGES:

The `scrollableContent` property is no more - use `iosExpandSafeArea` instead.
This commit is contained in:
Vasil Chimev
2018-09-03 22:42:25 +03:00
committed by Martin Yankov
parent 351d78e80c
commit f40d6c1a97
2 changed files with 0 additions and 15 deletions

View File

@@ -798,7 +798,6 @@ export namespace ios {
* @param view The view form which to start the search. * @param view The view form which to start the search.
*/ */
export function getParentWithViewController(view: View): View export function getParentWithViewController(view: View): View
export function isContentScrollable(controller: any /* UIViewController */, owner: View): boolean
export function updateAutoAdjustScrollInsets(controller: any /* UIViewController */, owner: View): void export function updateAutoAdjustScrollInsets(controller: any /* UIViewController */, owner: View): void
export function updateConstraints(controller: any /* UIViewController */, owner: View): void; export function updateConstraints(controller: any /* UIViewController */, owner: View): void;
export function layoutView(controller: any /* UIViewController */, owner: View): void; export function layoutView(controller: any /* UIViewController */, owner: View): void;

View File

@@ -659,21 +659,7 @@ export namespace ios {
return view; return view;
} }
export function isContentScrollable(controller: UIViewController, owner: View): boolean {
let scrollableContent = (<any>owner).scrollableContent;
if (scrollableContent === undefined) {
const view: UIView = controller.view.subviews.count > 0 ? controller.view.subviews[0] : null;
if (view instanceof UIScrollView) {
scrollableContent = true;
}
}
return scrollableContent === true || scrollableContent === "true";
}
export function updateAutoAdjustScrollInsets(controller: UIViewController, owner: View): void { export function updateAutoAdjustScrollInsets(controller: UIViewController, owner: View): void {
const scrollable = isContentScrollable(controller, owner);
if (majorVersion <= 10) { if (majorVersion <= 10) {
owner._automaticallyAdjustsScrollViewInsets = false; owner._automaticallyAdjustsScrollViewInsets = false;
// This API is deprecated, but has no alternative for <= iOS 10 // This API is deprecated, but has no alternative for <= iOS 10