mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 02:54:11 +08:00
fix(ios): iOS 10 support with adjustment to UILayoutGuide (#8954)
This commit is contained in:

committed by
GitHub

parent
6a24061f54
commit
ad2575991a
@ -201,7 +201,7 @@ export class IOSHelper {
|
|||||||
|
|
||||||
static initLayoutGuide(controller: UIViewController) {
|
static initLayoutGuide(controller: UIViewController) {
|
||||||
const rootView = controller.view;
|
const rootView = controller.view;
|
||||||
const layoutGuide = UILayoutGuide.alloc().init();
|
const layoutGuide = UILayoutGuide.new();
|
||||||
rootView.addLayoutGuide(layoutGuide);
|
rootView.addLayoutGuide(layoutGuide);
|
||||||
NSLayoutConstraint.activateConstraints(<any>[layoutGuide.topAnchor.constraintEqualToAnchor(controller.topLayoutGuide.bottomAnchor), layoutGuide.bottomAnchor.constraintEqualToAnchor(controller.bottomLayoutGuide.topAnchor), layoutGuide.leadingAnchor.constraintEqualToAnchor(rootView.leadingAnchor), layoutGuide.trailingAnchor.constraintEqualToAnchor(rootView.trailingAnchor)]);
|
NSLayoutConstraint.activateConstraints(<any>[layoutGuide.topAnchor.constraintEqualToAnchor(controller.topLayoutGuide.bottomAnchor), layoutGuide.bottomAnchor.constraintEqualToAnchor(controller.bottomLayoutGuide.topAnchor), layoutGuide.leadingAnchor.constraintEqualToAnchor(rootView.leadingAnchor), layoutGuide.trailingAnchor.constraintEqualToAnchor(rootView.trailingAnchor)]);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user