mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Fix: The navigation bar duplicates when going to TabView's "More" tab
Resolves #2121
This commit is contained in:
4
tns-core-modules/ui/frame/frame.d.ts
vendored
4
tns-core-modules/ui/frame/frame.d.ts
vendored
@@ -346,6 +346,10 @@ declare module "ui/frame" {
|
||||
* Use NavBarVisibility enumeration - auto, never, always
|
||||
*/
|
||||
navBarVisibility: string;
|
||||
|
||||
//@private
|
||||
_disableNavBarAnimation: boolean;
|
||||
//@endprivate
|
||||
}
|
||||
|
||||
//@private
|
||||
|
||||
@@ -661,6 +661,10 @@ class iOSFrame implements definition.iOSFrame {
|
||||
private _showNavigationBar: boolean;
|
||||
private _navBarVisibility: string;
|
||||
private _frame: Frame;
|
||||
|
||||
// TabView uses this flag to disable animation while showing/hiding the navigation bar because of the "< More" bar.
|
||||
// See the TabView._handleTwoNavigationBars method for more details.
|
||||
public _disableNavBarAnimation: boolean;
|
||||
|
||||
constructor(frame: Frame) {
|
||||
this._frame = frame;
|
||||
@@ -681,7 +685,7 @@ class iOSFrame implements definition.iOSFrame {
|
||||
var change = this._showNavigationBar !== value;
|
||||
this._showNavigationBar = value;
|
||||
|
||||
let animated = !this._frame._isInitialNavigation;
|
||||
let animated = !this._frame._isInitialNavigation && !this._disableNavBarAnimation;
|
||||
this._controller.setNavigationBarHiddenAnimated(!value, animated);
|
||||
|
||||
let currentPage = this._controller.owner.currentPage;
|
||||
|
||||
Reference in New Issue
Block a user