Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-20237] iOS: During a view transition the children of the view are not visible

GitHub Issuen/a
TypeBug
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 5.1.2, Release 5.1.1
Fix Version/sn/a
ComponentsiOS
Labelsn/a
Reporternicolomonili
AssigneeUnknown
Created2016-01-12T13:28:29.000+0000
Updated2018-02-28T19:55:34.000+0000

Description

During a view transition the children of the view are not visible. When the animation is finished , the children of the view appear. Try to switch from view 1 and view2 (or view3) and vice versa. Try to switch from view 1 and view 1. In this case the animation is correct *Test code*

var win1 = Titanium.UI.createWindow({  
    title:'Tab 1',
    backgroundColor:'#fff'
});

var btn1 = Ti.UI.createButton({
	title : "test 1",
	bottom : 10,
	width : 100,
	left : 10
});
var btn2 = Ti.UI.createButton({
	title : "test 2",
	bottom : 10,
	width : 100
});
var btn3 = Ti.UI.createButton({
	title : "test 3",
	bottom : 10,
	width : 100,
	right : 10
});


var controlView = Titanium.UI.createView({
	height:300,
	width:300
});

var view1 = Titanium.UI.createView({
	width:300,
	height:300,
	backgroundColor : "red"
});
var label1 = Ti.UI.createLabel({
	text : "label1"
});
var switch1 = Ti.UI.createSwitch({
	top : 10
});
var switch2 = Ti.UI.createSwitch({
	top : 60,
	value : true
});

var view2 = Titanium.UI.createView({
	width:300,
	height:300,
	backgroundColor : "green"
});
var label2 = Ti.UI.createLabel({
	text : "label2"
});

var view3 = Titanium.UI.createView({
	width:300,
	height:300,
	backgroundColor : "blue"
});
var label3 = Ti.UI.createLabel({
	text : "label3"
});

btn1.addEventListener('click', function(){
	controlView.animate({view:view1,transition:Ti.UI.iPhone.AnimationStyle.FLIP_FROM_LEFT});
});
btn2.addEventListener('click', function(){
	controlView.animate({view:view2,transition:Ti.UI.iPhone.AnimationStyle.FLIP_FROM_RIGHT});
});
btn3.addEventListener('click', function(){
	controlView.animate({view:view3,transition:Ti.UI.iPhone.AnimationStyle.FLIP_FROM_LEFT});
});


view1.add(label1,switch1,switch2);
view2.add(label2);
view3.add(label3);

controlView.add(view1);

win1.add(controlView,btn1,btn2,btn3);

win1.open();
*Video-explanation attached*

Attachments

FileDateSize
transition_view.mov2016-01-12T13:26:20.000+00005335782

Comments

  1. nicolomonili 2016-09-15

    +1

JSON Source