{ "id": "138631", "key": "TIMOB-17930", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": null, "resolutiondate": null, "created": "2014-10-27T23:07:13.000+0000", "priority": null, "labels": [], "versions": [], "issuelinks": [], "assignee": null, "updated": "2018-02-28T20:03:23.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "Hi.\r\n\r\n\r\nTo see issue run this code:\r\n\r\n{code}\r\nvar tabGroup = Ti.UI.createTabGroup();\r\n\r\nvar win1 = Ti.UI.createWindow({ backgroundColor: '#f00', title: 'Win 1' });\r\nvar win2 = Ti.UI.createWindow({ backgroundColor: '#00f', title: 'Win 2' });\r\n\r\nvar tab1 = Ti.UI.createTab({ title: 'Red', window: win1 });\r\nvar tab2 = Ti.UI.createTab({ title: 'Blue', window: win2 });\r\n\r\ntabGroup.addTab(tab1);\r\ntabGroup.addTab(tab2);\r\n\r\nfunction createWin() {\r\n\tvar navButton = Ti.UI.createLabel({\r\n\t\tcolor: \"#000\",\r\n\t\ttext: 'Test'\r\n\t});\r\n\r\n\tvar newWin = Ti.UI.createWindow({ backgroundColor: '#0f0', title: 'New Win' });\r\n\r\n\tvar scrollView = Ti.UI.createScrollView({ layout: 'vertical' });\r\n\r\n\tfor (var i = 0; i < 10; i++) {\r\n\t\tvar view = Ti.UI.createView({ height: Ti.UI.SIZE, layout: 'vertical', top: 10 });\r\n\t\tfor (var j = 0; j < 3; j++) {\r\n\t\t\tvar l = Ti.UI.createLabel({ text: 'Label ' + j, top: 5 });\r\n\t\t\tview.add(l);\r\n\t\t}\r\n\t\tscrollView.add(view);\r\n\t}\r\n\r\n\tnewWin.add(scrollView);\r\n\r\n\tnewWin.leftNavButton = navButton;\r\n\r\n\treturn newWin;\r\n}\r\n\r\nwin1.add(Ti.UI.createLabel({ text: 'Win open in tab bug' }));\r\nwin2.add(Ti.UI.createLabel({ text: 'Win open in nav win bug' }));\r\n\r\nwin1.addEventListener('click', function() {\r\n\r\n\tvar newWin = createWin();\r\n\r\n\tnewWin.leftNavButton.addEventListener('click', function() {\r\n\t\ttab1.close(newWin);\r\n\t});\r\n\r\n\ttab1.open(newWin);\r\n});\r\n\r\nwin2.addEventListener('click', function() {\r\n\tvar navwin2 = Titanium.UI.createWindow({\r\n\t\tbackgroundColor: '#fff',\r\n\t\ttitle: 'Red Window'\r\n\t});\r\n\r\n\tnavwin2.add(Ti.UI.createLabel({ text: 'Click to open new win', top: 50 }));\r\n\r\n\tvar closeLabel = Ti.UI.createLabel({ text: 'Click to close', top: 150 });\r\n\r\n\tnavwin2.add(closeLabel);\r\n\r\n\tcloseLabel.addEventListener('click', function() {\r\n\t\tnavwin1.close();\r\n\t});\r\n\r\n\tvar navwin1 = Titanium.UI.iOS.createNavigationWindow({\r\n\t\twindow: navwin2\r\n\t});\r\n\r\n\tnavwin2.addEventListener('click', function() {\r\n\t\t\r\n\t\tvar newWin = createWin();\r\n\r\n\t\tnewWin.leftNavButton.addEventListener('click', function() {\r\n\t\t\tnavwin1.closeWindow(newWin);\r\n\t\t});\r\n\r\n\t\tnavwin1.openWindow(newWin);\r\n\t});\r\n\r\n\tnavwin1.open();\r\n});\r\n\r\ntabGroup.open();\r\n{code}\r\n\r\nYou need to test this on iPhone 4. On faster phones, you need to increase number of elements in \"createWin\" function. In real app, we experienced this with iPhone 4, 4s and 5c (5s is fast enough, while we didn't test app with 5).\r\n\r\nFirst, click on red window. Notice two things:\r\n* vertical layout is slow (you can see all labels on top), it seems layout mechanism waits until window is opened\r\n* left nav button shows default value first, then custom label\r\n\r\n\r\nAfter that, check out second example by clicking Blue tab and clicking on that window. You should see white window of navigation window, then click on label to open new window in nav window. You should see same issues as with tab group.", "attachment": [], "flagged": false, "summary": "Poor rendering performances when opening new window inside tab / nav window", "creator": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "* Ti SDK 3.4.0.GA\r\n* Ti CLI 3.4.0\r\n* XCode 6.1\r\n* iOS 7\r\n* iPhone 4", "comment": { "comments": [ { "id": "329650", "author": { "name": "rborn", "key": "rborn", "displayName": "Dan Tamas", "active": true, "timeZone": "Europe/Berlin" }, "body": "For the layout part there is already a ticket: TIMOB-17923", "updateAuthor": { "name": "rborn", "key": "rborn", "displayName": "Dan Tamas", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-10-27T23:32:03.000+0000", "updated": "2014-10-27T23:32:03.000+0000" }, { "id": "329716", "author": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Gracias amigo, will take a look :)", "updateAuthor": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2014-10-28T08:28:28.000+0000", "updated": "2014-10-28T08:28:28.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }