Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1572] iOS: Modal Transition Effect Failure

GitHub Issuen/a
TypeBug
PriorityTrivial
StatusClosed
ResolutionCannot Reproduce
Resolution Date2012-07-25T16:54:53.000+0000
Affected Version/sRelease 1.5.0
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterClifton Labrum
AssigneeNeeraj Gupta
Created2011-04-15T02:56:22.000+0000
Updated2012-07-26T22:22:16.000+0000

Description

If you define a window that uses the 'url' attribute to reference its contents, and then open that window as a modal, none of the modal transition effects work except the default: Ti.UI.iPhone.MODAL_TRANSITION_STYLE_COVER_VERTICAL.

For example, the following code will open the modal with the above default, and ignore the cross dissolve effect requested:

//Search Modal
var searchModal = Ti.UI.createWindow({ 
   backgroundImage:'../images/background-modal.png', 
   navBarHidden:true,
   url:'search.js'
});
//Open Modal
button.addEventListener('click',function(){
   searchModal.open({ modal:true, modalTransitionStyle:Ti.UI.iPhone.MODAL_TRANSITION_STYLE_CROSS_DISSOLVE, modalStyle:Ti.UI.iPhone.MODAL_PRESENTATION_FULLSCREEN
   });
});

The current workaround is to not use a separate file for the window's content (which is problematic and messy in complex projects).

Thanks!

Comments

  1. ctredway 2011-04-15

    re assigning

  2. Stephen Tramer 2011-04-15

    Probably not possible; modal windows always appear by floating up and over. Assigning to view wizard Blain.

  3. Stephen Tramer 2012-07-25

    Cannot reproduce in SDK 2.2.0.f9e938d, iPhone Sim 5.1. Test code: app.js
       var win = Ti.UI.createWindow();
       var b = Ti.UI.createButton({
           title:'click'
       });
       b.addEventListener('click', function() {
       //Search Modal
       var searchModal = Ti.UI.createWindow({ 
          navBarHidden:true,
          url:'search.js'
       });
       searchModal.open({modal:true, modalTransitionStyle:Ti.UI.iPhone.MODAL_TRANSITION_STYLE_CROSS_DISSOLVE, modalStyle:Ti.UI.iPhone.MODAL_PRESENTATION_FULLSCREEN});
       });
       win.add(b);
       win.open();
       
    search.js
       var win = Ti.UI.currentWindow;
       
       win.add(Ti.UI.createLabel({
       	color:'white',
       	text:'coolblastgold',
       	width:Ti.UI.SIZE,
       	height:Ti.UI.SIZE
       }));
       

JSON Source