Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

How to use this animation style?

Here is my code that is created when I click a button

var w = Titanium.UI.createWindow({



        title:'Add Location',
        backgroundColor:'#000000',
        opacity:1,
        barColor:'#000000',
        url:'addlocation.js'
    });

    Titanium.UI.currentTab.open(w,{animated:true});

And here is the style I want to use

MODAL_TRANSITION_STYLE_FLIP_HORIZONTAL

For some reason all it does is slide up to open

— asked November 10th 2010 by Josh Lewis
  • animation
  • iphone
  • modal
0 Comments

3 Answers

  • You need to use another method to open modal views:

    w.open(
    {
        modal: true, 
        modalTransitionStyle: Ti.UI.iPhone.MODAL_TRANSITION_STYLE_FLIP_HORIZONTAL, 
        modalStyle: Ti.UI.iPhone.MODAL_PRESENTATION_FULLSCREEN, 
        navBarHidden: false
    });
    
    — answered November 11th 2010 by Adam Renklint
    permalink
    0 Comments
  • Here is my code. If I take out the url part, it works, but then theres nothing to see..

    addButton.addEventListener('click',function(e)
    {
        var winAdd = Titanium.UI.createWindow({  
                title:'Add Location',
                url:'addlocation.js',
                barColor:'#000000',
                backgroundImage:'stripes.png',
                backgroundColor:'#fff'
            });
            //Titanium.UI.currentTab.open(winAdd,{animated:true});
        var t = Ti.UI.iPhone.AnimationStyle.CURL_UP;
        Ti.UI.currentWindow.animate({window:winAdd,transition:t})
    });
    
    — answered November 13th 2010 by Josh Lewis
    permalink
    0 Comments
  • Nope, just does the same old slide from the bottom transition.

    — answered November 11th 2010 by Josh Lewis
    permalink
    2 Comments
    • Did you remove the old line where you open then window? I tested this piece of code just now and it works for me.

          var w = Titanium.UI.createWindow({
              title:'Add Location',
              backgroundColor:'#000000',
              opacity:1,
              barColor:'#000000'
          });
          w.open({
              modal: true, 
              modalTransitionStyle: Ti.UI.iPhone.MODAL_TRANSITION_STYLE_FLIP_HORIZONTAL, 
                 modalStyle: Ti.UI.iPhone.MODAL_PRESENTATION_FULLSCREEN, 
              navBarHidden: false
          });
      

      — commented November 11th 2010 by Adam Renklint
    • It only works if I dont have the url in my createWindow. If I take it out, it works but there is nothing to look at so its kind of pointless.

      — commented November 13th 2010 by Josh Lewis
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.