{ "id": "86231", "key": "AC-2934", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2012-03-25T08:40:14.000+0000", "created": "2012-02-08T14:10:00.000+0000", "labels": [ "defect", "ios", "ipod" ], "versions": [], "issuelinks": [], "assignee": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "updated": "2016-03-08T07:47:55.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "h2.Problem\r\nWhen setTitleControl is used upon opening a second window, the title view initially positions itself at the far left of the nav bar, then you can see it jump to the center of the navbar. Note that this effect may not be observable on faster (newer) iPhones and cannot be seen on the Simulator...this test is done on an iPod Touch 3G.\r\n\r\nh2. Expected Result\r\nThe title view should not be added to the navbar until after its position (centered) has been set. So when you first see the title view, it should be centered on the nav bar.\r\n\r\nh2. Steps to Reproduce\r\n# drop the following app.js code into a new project\r\n# build with SDK 1.8.1\r\n# run on a 3G iPod Touch\r\n# click the \"Click Me\" button and watch the navbar\r\n\r\nh2. Testcase\r\n\r\n{code:title=app.js}\r\nvar win1 = Ti.UI.createWindow({ \r\n title:'Main',\r\n backgroundColor:'gray',\r\n navBarHidden:false,\r\n barColor:'silver'\r\n});\r\n\r\nvar ng=Ti.UI.iPhone.createNavigationGroup({window:win1});\r\nvar NavBase = Ti.UI.createWindow();\r\nNavBase.add(ng);\r\nNavBase.open();\r\n\r\nvar btn1=Ti.UI.createButton({title:'Click Me',\r\n width:'92dp',\r\n height:'44dp'});\r\nwin1.add(btn1);\r\n\r\nbtn1.addEventListener('click',SecondWind);\r\nfunction SecondWind()\r\n{\r\n var win2 = Ti.UI.createWindow({ \r\n backgroundColor:'gray',\r\n navBarHidden:false,\r\n barColor:'silver'\r\n });\r\n ng.open(win2,{animated:true});\r\n \r\n var lbl1=Ti.UI.createLabel({color:'white',\r\n text:'New Title Control\\nOn Two Lines',\r\n height:44,\r\n textAlign:'center'});\r\n win2.setTitleControl(lbl1);\r\n}\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: setTitleControl initially positions left instead of centered, then jumps into center", "creator": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "environment": "- Titanium Mobile SDK 1.8.1\r\n- iPod Touch 3G, iOS 4.3.5\r\n- Mac OSX 10.7.2\r\n- Titanium Studio 1.0.8.201201262211\r\n\r\n", "comment": { "comments": [ { "id": "188508", "author": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Please try the 1.8.2 build or later. We tested and it seems to work fine. You can download the latest build from here http://builds.appcelerator.com.s3.amazonaws.com/index.html\r\n\r\nLet me know if this issue is existing in the latest build.", "updateAuthor": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-03-25T08:40:02.000+0000", "updated": "2012-03-25T08:40:02.000+0000" }, { "id": "188563", "author": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "body": "Shak, I just tested on SDK 2.0.0.v20120325213306 and the problem still exists. Did you test on an iPod Touch 3G (see the problem description)? It is easily seen on that device.\r\n", "updateAuthor": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "created": "2012-03-26T07:31:21.000+0000", "updated": "2012-03-26T07:31:21.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }