[TIMOB-1572] iOS: Modal Transition Effect Failure
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Trivial |
| Status | Closed |
| Resolution | Cannot Reproduce |
| Resolution Date | 2012-07-25T16:54:53.000+0000 |
| Affected Version/s | Release 1.5.0 |
| Fix Version/s | n/a |
| Components | iOS |
| Labels | n/a |
| Reporter | Clifton Labrum |
| Assignee | Neeraj Gupta |
| Created | 2011-04-15T02:56:22.000+0000 |
| Updated | 2012-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!
re assigning
Probably not possible; modal windows always appear by floating up and over. Assigning to view wizard Blain.
Cannot reproduce in SDK 2.2.0.f9e938d, iPhone Sim 5.1. Test code: app.js
search.jsvar 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();var win = Ti.UI.currentWindow; win.add(Ti.UI.createLabel({ color:'white', text:'coolblastgold', width:Ti.UI.SIZE, height:Ti.UI.SIZE }));