FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(ios): flat action bar incorrect layout after navigation (#7077) · NativeScript/NativeScript@1dc3952 · GitHub

Commit 1dc3952

Browse files
authored
fix(ios): flat action bar incorrect layout after navigation (#7077)
* fix(action-bar): incorrect layout after navigation * set extended layout for opaque bars earlier
1 parent 325f727 commit 1dc3952

3 files changed

Lines changed: 24 additions & 9 deletions

File tree

‎tns-core-modules/ui/core/view/view.ios.ts‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -904,6 +904,14 @@ export namespace ios {
904904
return controller;
905905
}
906906

907+
public viewDidLoad(): void {
908+
super.viewDidLoad();
909+
910+
// Unify translucent and opaque bars layout
911+
// this.edgesForExtendedLayout = UIRectEdgeBottom;
912+
this.extendedLayoutIncludesOpaqueBars = true;
913+
}
914+
907915
public viewWillLayoutSubviews(): void {
908916
super.viewWillLayoutSubviews();
909917
const owner = this.owner.get();
@@ -959,9 +967,6 @@ export namespace ios {
959967
return;
960968
}
961969

962-
// Unify translucent and opaque bars layout
963-
this.extendedLayoutIncludesOpaqueBars = true;
964-
965970
updateAutoAdjustScrollInsets(this, owner);
966971

967972
if (!owner.parent) {

‎tns-core-modules/ui/page/page.ios.ts‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,14 @@ class UIViewControllerImpl extends UIViewController {
6868
return controller;
6969
}
7070

71+
public viewDidLoad(): void {
72+
super.viewDidLoad();
73+
74+
// Unify translucent and opaque bars layout
75+
// this.edgesForExtendedLayout = UIRectEdgeBottom;
76+
this.extendedLayoutIncludesOpaqueBars = true;
77+
}
78+
7179
public viewWillAppear(animated: boolean): void {
7280
super.viewWillAppear(animated);
7381
const owner = this._owner.get();
@@ -100,9 +108,6 @@ class UIViewControllerImpl extends UIViewController {
100108
frame._updateActionBar(owner);
101109
}
102110

103-
// Unify translucent and opaque bars layout
104-
this.extendedLayoutIncludesOpaqueBars = true;
105-
106111
// Set autoAdjustScrollInsets in will appear - as early as possible
107112
iosView.updateAutoAdjustScrollInsets(this, owner);
108113

‎tns-core-modules/ui/tab-view/tab-view.ios.ts‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ class UITabBarControllerImpl extends UITabBarController {
2828
return handler;
2929
}
3030

31+
public viewDidLoad(): void {
32+
super.viewDidLoad();
33+
34+
// Unify translucent and opaque bars layout
35+
// this.edgesForExtendedLayout = UIRectEdgeBottom;
36+
this.extendedLayoutIncludesOpaqueBars = true;
37+
}
38+
3139
@profile
3240
public viewWillAppear(animated: boolean): void {
3341
super.viewWillAppear(animated);
@@ -36,9 +44,6 @@ class UITabBarControllerImpl extends UITabBarController {
3644
return;
3745
}
3846

39-
// Unify translucent and opaque bars layout
40-
this.extendedLayoutIncludesOpaqueBars = true;
41-
4247
iosView.updateAutoAdjustScrollInsets(this, owner);
4348

4449
if (!owner.parent) {

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL