Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14624] iOS7: Implement the new view transition animations

GitHub Issuen/a
TypeNew Feature
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2013-10-29T22:03:08.000+0000
Affected Version/sRelease 3.2.0
Fix Version/s2013 Sprint 21, 2013 Sprint 21 API, Release 3.2.0
ComponentsiOS
Labelsios7, module_navwindow, module_tabgroup, qe-testadded
ReporterSabil Rahim
AssigneePedro Enrique
Created2013-07-22T21:30:10.000+0000
Updated2016-05-26T14:21:04.000+0000

Description

iOS 7 has introduced new transition animations for showing/hiding views.

Attachments

FileDateSize
xcode_console.log2013-10-17T00:39:17.000+00001363

Comments

  1. Pedro Enrique 2013-10-15

    PR: https://github.com/appcelerator/titanium_mobile/pull/4791 Sample code:
       
       function MultiColorWindow(_param) {
           var transition = Ti.UI.iOS.createTransitionAnimation({
               duration: 300,
               transitionTo: {
                   opacity: 1,
                   duration: 300,
                   transform: Ti.UI.create2DMatrix()
               },
               transitionFrom: {
                   opacity: 0,
                   duration: 300 / 2,
                   transform: Ti.UI.create2DMatrix().rotate(_param === 0 ? 180 : 0).scale(_param / 2),
               }
           });
           
           var win = Ti.UI.createWindow({
               backgroundColor: "#"+((1<<24)*Math.random()|0).toString(16),
               title: 'MultiColorWindow',
               transitionAnimation: transition,
               opacity: _param,
               transform: Ti.UI.create2DMatrix().scale(_param).rotate(_param === 0 ? 180 : 0)
           });
       
           var btn = Ti.UI.createButton({
               title: 'next!!'
           });
           win.add(btn);
       
           btn.addEventListener('click', function(){
               // tab.openWindow(MultiColorWindow(0));
               navWindow.openWindow(MultiColorWindow(0));
           });
       
           return win;
       }
       
       var navWindow = Ti.UI.iOS.createNavigationWindow({
           window: MultiColorWindow(1)
       });
       
       navWindow.open();
       // var tabgroup = Ti.UI.createTabGroup({
       // });
       
       // var tab = Ti.UI.createTab({
       //     window: MultiColorWindow(1)
       // });
       
       // tabgroup.addTab(tab);
       // tabgroup.open();
       
  2. Vishal Duggal 2013-10-16

    This PR implements UIViewControllerAnimatedTransitioning We currently have no plans to implement UIViewControllerInteractiveTransitioning. Also note that this PR does not add support for transition Animations (transition property of Ti.UI.Animation). We will look at adding support for that in future versions of the SDK.
  3. Wilson Luu 2013-10-17

    Reopening ticket. The above sample code works fine on iPhone Simulator (7.0). But, above sample code does not work on iphone 5s (7.0); app does not launch on device (see xcode_console.log). Tested on: Titanium Studio, build: 3.2.0.201310152326 SDK build: 3.2.0.v20131016165643 Device: iphone 5s (7.0) Xcode: 5.0
  4. Martin Guillon 2013-10-17

    very nice!
  5. Vishal Duggal 2013-10-17

    We put the creation code in the wrong ifdef block. Fixing. 10 minutes.
  6. Vishal Duggal 2013-10-17

    Fixed by PR https://github.com/appcelerator/titanium_mobile/pull/4799
  7. Pragya Rastogi 2013-10-21

    Tested With: OSX: 10.8.5 Xcode:5.0 Appcelerator Studio: 3.2.0.201310181700 SDK:3.2.0.v20131018154951 acs:1.0.7 alloy:1.2.2 npm:1.3.2 titanium:3.2.0 titanium-code-processo:1.0.3 Device: iPod touch 2 (v iOS7)
  8. Wilson Luu 2013-10-29

    Reopening ticket. The navWindow with transitionAnimation test case runs fine on iOS Simulator (7.0) and iphone 5s (7.0.2). *However,* the tabGroup with transitionAnimation test case fails to install onto device (runs fine on iOS Simulator 7.0). *Tested on:* SDK build: 3.2.0.v20131028170320 Ti CLI: 3.2.0 (master) Xcode: 5.0 Device: iphone 5s (7.0.2) *tabGroup with transitionAnimation test case:*
       function MultiColorWindow(_param) {
           var transition = Ti.UI.iOS.createTransitionAnimation({
               duration: 300,
               transitionTo: {
                   opacity: 1,
                   duration: 300,
                   transform: Ti.UI.create2DMatrix()
               },
               transitionFrom: {
                   opacity: 0,
                   duration: 300 / 2,
                   transform: Ti.UI.create2DMatrix().rotate(_param === 0 ? 180 : 0).scale(_param / 2),
               }
           });
            
           var win = Ti.UI.createWindow({
               backgroundColor: "#"+((1<<24)*Math.random()|0).toString(16),
               title: 'MultiColorWindow',
               transitionAnimation: transition,
               opacity: _param,
               transform: Ti.UI.create2DMatrix().scale(_param).rotate(_param === 0 ? 180 : 0)
           });
        
           var btn = Ti.UI.createButton({
               title: 'next!!'
           });
           win.add(btn);
        
           btn.addEventListener('click', function(){
               tab.openWindow(MultiColorWindow(0));
           });
        
           return win;
       }
        
       var tabgroup = Ti.UI.createTabGroup({
       });
        
       var tab = Ti.UI.createTab({
            window: MultiColorWindow(1)
       });
        
       tabgroup.addTab(tab);
       tabgroup.open();
       
    *Error when installing to device*
       [INFO] :   Invoking xcodebuild
       [ERROR] :  ** BUILD FAILED **
       [ERROR] :  The following build commands failed:
       [ERROR] :  	CompileC build/TIMOB-14624.build/Debug-iphoneos/TIMOB-14624-universal.build/Objects-normal/armv7/TiUIiOSProxy.o Classes/TiUIiOSProxy.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
       [ERROR] :  (1 failure)
       
  9. Pedro Enrique 2013-10-29

    PR: https://github.com/appcelerator/titanium_mobile/pull/4877
  10. Wilson Luu 2013-10-30

    Closing ticket as fixed. Verified both navWindow and tabGroup test cases are working as expected on device and simulator. Tested on: Titanium Studio, build: 3.2.0.201310300119 SDK build: 3.2.0.v20131029150357 Ti CLI: 3.2.0 (master) Device: iPhone Simulator (7.0), iphone 5s (7.0.2) Xcode: 5.0
  11. Anna 2016-05-26

    I'm having this issue now. Without changing anything this error appear and I can't compile my app.

JSON Source