ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

nav-title-slide-ios7 always on in Beta 8, cannot be disabled/changed

Open djensen47 opened this issue 12 years ago • 36 comments

In Beta 8 the nav-title-slide-ios7 animation is always on.

For instance, This

<ion-nav-bar class="bar-positive no-animation" animation="no-animation">

gets rendered as this

<ion-nav-bar class="bar-positive no-animation bar bar-header nav-bar nav-title-slide-ios7 disable-user-behavior" animation="no-animation">
</ion-nav-bar>

Here's a codepen by mhartington http://codepen.io/mhartington/pen/sDcna

djensen47 avatar Jun 24 '14 23:06 djensen47

http://codepen.io/anon/pen/yyMBVK

I noticed that if I change it to some previous beta versions (beta.13 for example, it works as expected). Beta.14 just seems to not honor no-animation.

bodytaing avatar Jan 12 '15 22:01 bodytaing

So with beta 14, the animation attribute has been removed. You can disable animations on a link by link basis.

http://codepen.io/mhartington/pen/KwWPxB

mhartington avatar Jan 13 '15 00:01 mhartington

Thanks Mike Hartington, I will try this on my app and let you know.

bodytaing avatar Jan 13 '15 19:01 bodytaing

I'm looking to remove all animation during screen transition. I navigate using $state.go not using links in your example. I tried using $ionicHistory (below) to disable the animation and the results seem to be inconsistent, for instance I've noticed it doesn't seem to remove the animation for pressing a back button (also saw some inconsistency between device and browser). I am placing the code snippet below at the top of all my controllers. Is my approach correct? Thanks!

$ionicHistory.nextViewOptions({ disableAnimate: true });

jreed88 avatar Jan 15 '15 21:01 jreed88

Did anyone get this sorted out? I am trying to disable all animations, but on iOS devices, it always does a slide animation. I am firing off navigation programmatically with $state.go in some cases, so disabling the animation on a link is not helpful for me. The code below works as expected on Android, just not iOS. Does anyone have any ideas?

<ion-nav-view animation="no-animation"></ion-nav-view>

c0r3yz avatar Mar 19 '15 14:03 c0r3yz

You can use this

$ionicConfigProvider.views.transition('none');

http://codepen.io/mhartington/pen/zxyByj

mhartington avatar Mar 19 '15 15:03 mhartington

That works for me, thanks!

c0r3yz avatar Mar 19 '15 15:03 c0r3yz

I'm still seeing this issue when using the ion-nav-bar combined with ion-nav-title inside of my view template. I'm trying to add a progress bar to the nav that will update as the user transitions through different pages however the only way I can get the nav to stop animating is to turn off animated transitions globally using $ionicConfigProvider.views.transition('none'). In the main index file I have:

<ion-nav-bar class="bar-positive" animation="no-animation">
      <ion-nav-back-button>
      </ion-nav-back-button>
    </ion-nav-bar>

and then in the template I have

<ion-view>
      <ion-nav-title>code for a progress bar will go here</ion-nav-title>
        <ion-content class="padding">
</ion-content>
</ion-view>

I would like to have transitions on the ion-content, just not the nav. Here is a codepen showing the issue based off of your standard example. You can see how the top bar is animated when clicking on the Scientific Facts button: http://codepen.io/maiamachine/pen/dPryzJ?editors=101

maiamachine avatar Mar 26 '15 21:03 maiamachine

The no-animation class has been removed from ionic. You could use $ionicConfigProvider.navBar.transition('none');, which isn't documented or fully tested. But not, it seems to be a bit buggy. Something we should work out post 1.0.

cc @adamdbradley

http://codepen.io/mhartington/pen/QwoJGo

mhartington avatar Mar 30 '15 14:03 mhartington

@mhartington $ionicConfigProvider.navBar.transition('none') does prevent title sliding, but it takes a second or so for the title to appear. Pretty obvious and can annoy end-users. Look forward to a proper fix for this.

Funny thing is titles didn't slide in rc2, only happened when I upgraded to rc3.

buunguyen avatar Apr 18 '15 02:04 buunguyen

I found the title issue seems to be caused when using $state.go(), normal ui-sref caused no issues but the minute i used $state the title has alignment issues. I have had to use $ionicConfigProvider.navBar.transition('none') as a workaround

ratt avatar Apr 28 '15 10:04 ratt

@buunguyen +1 Same situation here, on rc5.

marcelomiura avatar May 08 '15 15:05 marcelomiura

Hey guys, I'm experiencing the same issue with my navbar, I just want to have a simple logo on the middle of it, and obviously don't want to see a transition when changing views, is there anyway to fix this? Thanks!

marin42 avatar Jun 11 '15 12:06 marin42

I Agree with @buunguyen i also get the issue when using $ionicConfigProvider.navBar.transition('none')

dinesh36 avatar Oct 01 '15 10:10 dinesh36

wrap the image in a div and float the div to the right. worked for me with, $ionicConfigProvider.navBar.transition('none')

adamcweitzman avatar Jan 24 '16 05:01 adamcweitzman

How about a simple fix. Take a look at what it's doing with CSS. Overwrite their transition ;)

.. .title { opacity: 1 !important; transform: none !important; }

brainbrian avatar Apr 13 '16 23:04 brainbrian