Titanium JIRA Archive
Appcelerator Community (AC)

[AC-1237] iOS: Window title not visible when closing and opening a window using animations

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionCannot Reproduce
Resolution Date2014-12-31T00:08:42.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
LabelsTCSupportTriage
ReporterJick Steen
AssigneeMauro Parra-Miranda
Created2014-09-05T15:47:08.000+0000
Updated2016-03-08T07:37:37.000+0000

Description

Link to Q&A: [http://developer.appcelerator.com/question/177376/ios-window-title-not-visible-when-closing-and-opening-a-window-using-animations#comment-217935] Closing a window and opening another window both using animations results in a not displayed window title. Disabling the animation in openWindow() will make the title appear again. It seems to be a regression as it works in 3.2.3 GA but is broken since 3.3.0 I spent a long time in trying to make a small example which should make it possible to reproduce:
var rootWindow = Ti.UI.iOS.createNavigationWindow();
rootWindow.window = Ti.UI.createWindow();
rootWindow.open();
rootWindow.openWindow($.index, {animated : false});
 
setTimeout(function () {
    rootWindow.closeWindow($.index, {animated : true});
 
    var win2 = Ti.UI.createWindow({
        backgroundColor: "#e7e7e7"
    });
    rootWindow.openWindow(win2, {animated : true});
    win2.title = 'My Title 2';
 
}, 5000);
<Alloy>
    <Window id="index" title="My Title">
        <View backgroundColor="red">
        </View>
    </Window>
</Alloy>
When executing the example you will notice the title is not visible. Setting
rootWindow.openWindow(win2, {animated : true});
to
rootWindow.openWindow(win2, {animated : false});
will make the title appear. Also not closing the $.index window makes the title appear again. Opening the new window in the close event of the previous window does not fix it.

Environment

* Does not work on Titanium 3.3.0 and latest 3.4.0 (master) * Does work on latest Titanium 3.2 * Tested on iPhone simulator version 7.1 * Titanium Command-Line Interface, CLI version 3.3.0 * Alloy 1.4.1 * OSX 10.9.4 * XCode 5.1.1

Comments

  1. Motiur Rahman 2014-09-11

    Hello, We have tested this issue. But we didn't reproduce this issue as a bug, window title is visible when closing and opening a window using animations.

    Testing Environment:

    Titanium SDK: 3.3.0.GA Titanium CLI: 3.3.0, iOS:7.1, OS X Version: 10.9.4, Appcelerator Studio: 3.3.0

    Steps to Test:

    1. Create a classic project. 2. Paste this code in app.js file. 4. Run this code with the testing environment.

    Test Code.

       var win2 = Titanium.UI.createWindow({
       	backgroundColor : 'red',
       	title : 'Red Window'
       });
       
       var win1 = Titanium.UI.iOS.createNavigationWindow({
       	window : win2
       });
       
       var win3 = Titanium.UI.createWindow({
       	backgroundColor : 'blue',
       	title : 'Blue Window'
       });
       
       var button = Titanium.UI.createButton({
       	title : 'Open Blue Window'
       });
       button.addEventListener('click', function() {
       	win1.openWindow(win3, {
       		animated : true
       	});
       });
       
       win2.add(button);
       var button2 = Titanium.UI.createButton({
       	title : 'Close Blue Window'
       });
       button2.addEventListener('click', function() {
       	win1.closeWindow(win3, {
       		animated : true
       	});
       	//win3.close() will also work!!
       });
       
       win3.add(button2);
       win1.open(); 
       
    Thanks.

JSON Source