New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TIMOB-17235]: iOS Windows in tabGroup flicker on first open #10014
Conversation
|
||
TiUIView *view = [window view]; | ||
TiViewController *controller = (TiViewController *)[window hostingController]; | ||
[view setFrame:controller.view.bounds]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about [TiUtils setView:controller.view positionRect:controller.view.bounds]
? It also respects the center, although it's not as important here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It still flickers randomly (both the label and the color behind the tab bottom-bar). Test-case:
Titanium.UI.setBackgroundColor('#000');
// create tab group
var tabGroup = Titanium.UI.createTabGroup();
var win1 = Titanium.UI.createWindow({
title:'Tab 1',
backgroundColor:'#fff'
});
var tab1 = Titanium.UI.createTab({
title:'Tab 1',
window:win1
});
var label1 = Titanium.UI.createLabel({
text:'I am Window 1',
textAlign:'center',
});
win1.add(label1);
//
// create base UI tab and root window
//
var win2 = Titanium.UI.createWindow({
title:'Tab 1',
backgroundColor:'#fff'
});
var tab2 = Titanium.UI.createTab({
title:'Tab 2',
window:win2
});
var label2 = Titanium.UI.createLabel({
text:'I am Window 2',
});
win2.add(label2);
var win3 = Titanium.UI.createWindow({
title:'Tab 3',
backgroundColor:'#fff'
});
var tab3 = Titanium.UI.createTab({
title:'Tab 3',
window:win3
});
var label3 = Titanium.UI.createLabel({
text:'I am Window 3',
});
win3.add(label3);
//
// create base UI tab and root window
//
var win4 = Titanium.UI.createWindow({
title:'Tab 4',
backgroundColor:'#fff'
});
var tab4 = Titanium.UI.createTab({
title:'Tab 4',
window:win4
});
var label4 = Titanium.UI.createLabel({
text:'I am Window 4',
});
win4.add(label4);
//
// add tabs
//
tabGroup.addTab(tab1);
tabGroup.addTab(tab2);
tabGroup.addTab(tab3);
tabGroup.addTab(tab4);
tabGroup.open();
@hansemannn I tried around 20 times on iphone/ipad simulator but unable to reproduce it. I assume you are testing on this PR. If you can share a small video, that would be great. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests passing now, CR approved!
Generated by 🚫 dangerJS |
https://jira.appcelerator.org/browse/TIMOB-17235