-
28 May 2012 4:52 PM #1
Unanswered: Running two animations instead of one, only on iPhone??
Unanswered: Running two animations instead of one, only on iPhone??
I'm putting my ST2 android app into iOS. Firstly I want to say how easy it is with ST (and phonegap!)- a couple of gotchas and you have it working. However something is still perplexing me.
The screens of my app are arranged in a tree structure of menus and sub-menus. The user moves down the tree by selecting a button or item, and the relevant screen is called :
On the android, this makes the next screen appear with not animation. On the iPhone, the new screen appears sliding in right to left.Code:Ext.ComponentManager.get('MainMenu').setActiveItem(22);
The user goes back up a level by selecting the back button:
On the android, the previous screen the user is returning to appears sliding in left to right.Code:Ext.ComponentManager.get('MainMenu').animateActiveItem(20, { type: 'slide', direction: 'right' });
On the iPhone, the new screen slides right to left and THEN left to right.
How would that happen? I've checked for some kind of property on the parent container that it might inherit but found nothing...
-
30 May 2012 5:55 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,121
- Vote Rating
- 453
- Answers
- 3160
Instead of using animateActiveItem, I would just use setActiveItem and specify the animation in the layout. When you want to go reverse, set reversed to true
This is how the tab panel handles the going back.Code:comp.getLayout().getAnimation().setReversed(true);
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.


Reply With Quote