mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 19:26:42 +08:00
Merge pull request #1868 from NativeScript/cankov/no-initial-actionbar-animation
No iOS UINavigationBar animation for the first Page
This commit is contained in:
@ -31,6 +31,7 @@ export class Frame extends frameCommon.Frame {
|
||||
public _heightMeasureSpec: number;
|
||||
public _right: number;
|
||||
public _bottom: number;
|
||||
public _isInitialNavigation: boolean = true;
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
@ -61,6 +62,7 @@ export class Frame extends frameCommon.Frame {
|
||||
public navigate(param: any) {
|
||||
if (this.isLoaded) {
|
||||
super.navigate(param);
|
||||
this._isInitialNavigation = false;
|
||||
}
|
||||
else {
|
||||
this._paramToNavigate = param;
|
||||
@ -608,9 +610,11 @@ class iOSFrame implements definition.iOSFrame {
|
||||
private _controller: UINavigationControllerImpl;
|
||||
private _showNavigationBar: boolean;
|
||||
private _navBarVisibility: string;
|
||||
private _frame: Frame;
|
||||
|
||||
constructor(owner: Frame) {
|
||||
this._controller = UINavigationControllerImpl.initWithOwner(new WeakRef(owner));
|
||||
constructor(frame: Frame) {
|
||||
this._frame = frame;
|
||||
this._controller = UINavigationControllerImpl.initWithOwner(new WeakRef(frame));
|
||||
this._controller.automaticallyAdjustsScrollViewInsets = false;
|
||||
//this.showNavigationBar = false;
|
||||
this._navBarVisibility = NavigationBarVisibility.auto;
|
||||
@ -626,7 +630,9 @@ class iOSFrame implements definition.iOSFrame {
|
||||
public set showNavigationBar(value: boolean) {
|
||||
var change = this._showNavigationBar !== value;
|
||||
this._showNavigationBar = value;
|
||||
this._controller.setNavigationBarHiddenAnimated(!value, true);
|
||||
|
||||
let animated = !this._frame._isInitialNavigation;
|
||||
this._controller.setNavigationBarHiddenAnimated(!value, animated);
|
||||
|
||||
let currentPage = this._controller.owner.currentPage;
|
||||
if (currentPage && change) {
|
||||
|
Reference in New Issue
Block a user