{ "id": "124180", "key": "TIMOB-16110", "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": "2013-12-25T02:18:33.000+0000", "priority": null, "labels": [ "autoadjustscrollviewinsets", "extendedges", "ios", "iphone", "navbar", "navigationWindow", "tableView" ], "versions": [ { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "issuelinks": [ { "id": "36497", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "128651", "key": "TIMOB-16826", "fields": { "summary": "iOS: ListView under NavigationWindow with extendEdges and autoAdjustScrollViewInsets fails to position properly.", "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" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": null, "updated": "2018-02-28T20:04:25.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": "I am running into the following problem when I create a NavigationWindow and a TableView. The TableView is hidden beneath the navbar. This is an issue that is present throughout my entire application. See first attached image for this issue.\r\n\r\nHere is an example case where in my app.js file, I am doing a simple user authentication. Depending on the outcome of that, determines which screen my user is navigated to. For this example, the user is directed to the login screen. Here is a snippet of code from that.\r\n\r\napp.js\r\n{code}\r\nvar nav = Ti.UI.iOS.createNavigationWindow();\r\nvar viewInc = require('login');\r\nvar viewWin = new viewInc.LoginUser(nav);\r\n \r\nnav.window = viewWin;\r\nviewWin.autoAdjustScrollViewInsets = true;\r\n \r\nnav.open();\r\n{code}\r\n\r\nYou can see that I am adjusting the scroll view insets before the window gets opened as stated in the docs. Now in my login.js file, I have the window and table view objects. Here are the properties associated with those.\r\n\r\nlogin.js – window\r\n\r\n{code}\r\nmainWin = Ti.UI.createWindow({\r\n backgroundColor:'#ededed',\r\n width:'auto',\r\n height:'auto',\r\n title:'Welcome',\r\n leftNavButton: Ti.UI.createButton({\r\n title: 'Register',\r\n color:'#fff',\r\n font:{\r\n fontSize:17,\r\n fontFamily:\"Helvetica Neue\"\r\n }\r\n }),\r\n rightNavButton: Ti.UI.createButton({\r\n title: 'Sign In',\r\n color:'#fff',\r\n font:{\r\n fontSize:17,\r\n fontFamily:\"Helvetica Neue\"\r\n },\r\n enabled:false\r\n }),\r\n navTintColor:'#fff',\r\n barColor:'#1179a0',\r\n extendEdges:[Ti.UI.EXTEND_EDGE_TOP],\r\n includeOpaqueBars:false\r\n});\r\n{code}\r\n\r\nlogin.js – tableView\r\n\r\n{code}\r\ntable = Ti.UI.createTableView({\r\n width:320,\r\n separatorColor:'#ddd',\r\n style:Ti.UI.iPhone.TableViewStyle.GROUPED,\r\n backgroundColor:'transparent',\r\n editable:false,\r\n footerView:forgot\r\n});\r\n{code}\r\n\r\nThis is definitely a bug that needs to be resolved quickly. I don't want to just simply move my table down because I want to have that nice blurred effect beneath the navbar as you are scrolling.\r\n{color:red}\r\nNow what I've noticed is that if you don't add any custom objects to the table rows, the issue is no longer present. In my application, I've added the two TextFields to the table rows. If I remove them and just have two empty table rows, I get the following... See second attachment.\r\n{color}", "attachment": [ { "id": "44803", "filename": "IMG_2400.PNG", "author": { "name": "mkinbaum", "key": "mkinbaum", "displayName": "Matthew Kinbaum", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-25T02:18:33.000+0000", "size": 87265, "mimeType": "image/png" }, { "id": "44804", "filename": "IMG_2401.PNG", "author": { "name": "mkinbaum", "key": "mkinbaum", "displayName": "Matthew Kinbaum", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-25T02:18:33.000+0000", "size": 29598, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS 7 Issue with TableView and autoAdjustScrollViewInsets", "creator": { "name": "mkinbaum", "key": "mkinbaum", "displayName": "Matthew Kinbaum", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "mkinbaum", "key": "mkinbaum", "displayName": "Matthew Kinbaum", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Operating System – OSX Mavericks 10.9.1\r\nHardware – iPhone 5S v. 7.0.4\r\nSoftware – Titanium v. 3.2.1.201312231716", "comment": { "comments": [ { "id": "285812", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "We have not been able to run the provided test case as it is not complete. For example, LoginUser is not defined in login.js, forgot is undefined in login.js, etc. Please provide a simple but complete test case to demonstrate this problem.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-26T05:53:15.000+0000", "updated": "2013-12-26T05:53:15.000+0000" }, { "id": "285909", "author": { "name": "mkinbaum", "key": "mkinbaum", "displayName": "Matthew Kinbaum", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Sorry about that. Here are the essentials of my login.js file:\n{code}\nfunction LoginUser(nav){\n\t\n\t'use strict';\n\t\n\tvar mainWin = Ti.UI.createWindow({\n\t\tbackgroundColor:'#ededed',\n\t\twidth:'auto',\n\t\theight:'auto',\n\t\ttitle:'Welcome',\n\t\tleftNavButton: Ti.UI.createButton({\n\t\t\ttitle: 'Register',\n\t\t\tcolor:'#fff',\n\t\t\tfont:{\n\t\t\t\tfontSize:17,\n\t\t\t\tfontFamily:\"Helvetica Neue\"\n\t\t\t}\n\t\t}),\n\t\trightNavButton: Ti.UI.createButton({\n\t\t\ttitle: 'Sign In',\n\t\t\tcolor:'#fff',\n\t\t\tfont:{\n\t\t\t\tfontSize:17,\n\t\t\t\tfontFamily:\"Helvetica Neue\"\n\t\t\t},\n\t\t\tenabled:false\n\t\t}),\n\t\tnavTintColor:'#fff',\n\t\tbarColor:'#1179a0',\n\t\textendEdges:[Ti.UI.EXTEND_EDGE_TOP],\n\t\tincludeOpaqueBars:false\n\t});\n\t\t\n\tvar forgot = Titanium.UI.createLabel({\n\t\ttext:'Forgot password?',\n\t\ttextAlign:'center',\n\t\tcolor:'#8899a6',\n\t\tfont:{\n\t\t\tfontSize:15,\n\t\t\tfontFamily:\"HelveticaNeue-Light\"\n\t\t}\n\t});\n\t\n\tvar table = Ti.UI.createTableView({\n width:320,\n\t\tseparatorColor:'#ddd',\n\t\tstyle:Ti.UI.iPhone.TableViewStyle.GROUPED,\n\t\tbackgroundColor:'transparent',\n\t\teditable:false,\n\t\t//scrollable:false,\n\t\tfooterView:forgot\n\t});\n\t\n\tvar row1 = Ti.UI.createTableViewRow({\n\t\tbackgroundColor:'#fff',\n\t\tselectionStyle:Ti.UI.iPhone.TableViewCellSelectionStyle.NONE\n\t});\n\t\n\tvar row2 = Ti.UI.createTableViewRow({\n\t\tbackgroundColor:'#fff',\n\t\tselectionStyle:Ti.UI.iPhone.TableViewCellSelectionStyle.NONE\n\t});\n\t\n\tvar userField = Ti.UI.createTextField({\n\t\thintText:\"Username or email\",\n\t\ttop:1,\n\t\twidth:320,\n\t\theight:42,\n\t\tpaddingLeft:15,\n\t\tcolor:'#8899a6',\n\t\tfont:{\n\t\t\tfontSize:15,\n\t\t\tfontFamily:\"HelveticaNeue-Light\"\n\t\t},\n\t\tautocorrect:false,\n\t\tautocapitalization:Ti.UI.TEXT_AUTOCAPITALIZATION_NONE,\n\t\treturnKeyType:Ti.UI.RETURNKEY_NEXT\n\t});\n\t\n\tvar passField = Ti.UI.createTextField({\n\t\thintText:\"Password\",\n\t\tpasswordMask:true,\n\t\ttop:1,\n\t\twidth:320,\n\t\theight:42,\n\t\tpaddingLeft:15,\n\t\tcolor:'#8899a6',\n\t\tfont:{\n\t\t\tfontSize:15,\n\t\t\tfontFamily:\"HelveticaNeue-Light\"\n\t\t},\n\t\treturnKeyType:Ti.UI.RETURNKEY_GO,\n\t\tenableReturnKey:true\n\t});\n\t\n\t// Events\n\t\n\tmainWin.addEventListener('focus', function(){\n\t\tuserField.focus();\n\t});\n\t\n\t// Add\n\t\n\t//row1.add(userField);\n\t//row2.add(passField);\n\t\n\ttable.appendRow(row1);\n\ttable.appendRow(row2);\n\t\n\tmainWin.add(table);\n\t\n\t// Open window\n\t\n\treturn mainWin;\n}\n\nexports.LoginUser = LoginUser;\n{code}", "updateAuthor": { "name": "mkinbaum", "key": "mkinbaum", "displayName": "Matthew Kinbaum", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-27T00:27:23.000+0000", "updated": "2013-12-27T00:27:23.000+0000" }, { "id": "285911", "author": { "name": "mkinbaum", "key": "mkinbaum", "displayName": "Matthew Kinbaum", "active": true, "timeZone": "America/Los_Angeles" }, "body": "If you uncomment the\n\n{code}\n//row1.add(userField);\n//row2.add(passField);\n{code}\n\nyou'll see that the table shoots up underneath the navbar.", "updateAuthor": { "name": "mkinbaum", "key": "mkinbaum", "displayName": "Matthew Kinbaum", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-27T00:30:27.000+0000", "updated": "2013-12-27T00:30:27.000+0000" }, { "id": "286139", "author": { "name": "mkinbaum", "key": "mkinbaum", "displayName": "Matthew Kinbaum", "active": true, "timeZone": "America/Los_Angeles" }, "body": "After some more testing, the issue looks to be when I focus on the user field.\nUncomment the section where I added the fields to the rows.\n\nNow comment out the mainWin focus function.\nYou'll see that the rows are displayed correctly in the view.\n\nNow click on a field to bring up the keyboard. This causes the table to \nshoot upwards and does not return to normal. ", "updateAuthor": { "name": "mkinbaum", "key": "mkinbaum", "displayName": "Matthew Kinbaum", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-28T21:18:05.000+0000", "updated": "2013-12-28T21:18:05.000+0000" }, { "id": "286267", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Moving the ticket to engineering for further evaluation and prioritization as we have been able to reproduce the issue with the sample provided.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-30T18:09:22.000+0000", "updated": "2013-12-30T18:09:22.000+0000" }, { "id": "287757", "author": { "name": "mkinbaum", "key": "mkinbaum", "displayName": "Matthew Kinbaum", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Is there any estimate on how long it will take to resolve this issue? \r\nThis is the only thing that has me set back from releasing my application.", "updateAuthor": { "name": "mkinbaum", "key": "mkinbaum", "displayName": "Matthew Kinbaum", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-11T00:01:31.000+0000", "updated": "2014-01-11T00:01:31.000+0000" }, { "id": "404392", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "We have the property {{autoAdjustScrollViewInsets}} that handles the adjustment automatically. By default, it is set to false which is different to the native behavior. So the fix is to set {{[controller setAutomaticallyAdjustsScrollViewInsets:[self boolValue:autoAdjust def:YES]];}} or use the workaround to just specify the above property and set it to {{true}}. I guess this was an outdated issue, since the following does work: \r\n\r\n{code:js}\r\nvar win = Ti.UI.createWindow({\r\n title: 'TEST',\r\n extendEdges: [Ti.UI.EXTEND_EDGE_TOP, Ti.UI.EXTEND_EDGE_BOTTOM],\r\n autoAdjustScrollViewInsets: true\r\n});\r\n\r\nvar nav = Ti.UI.iOS.createNavigationWindow({\r\n window: win\r\n});\r\nwin.add(Ti.UI.createListView({\r\n style: Ti.UI.iOS.ListViewStyle.GROUPED,\r\n sections: [Ti.UI.createListSection({\r\n items: [\r\n {properties: {title: 'Item 1', backgroundColor: \"#000\", color: \"red\"}},\r\n {properties: {title: 'Item 2'}},\r\n {properties: {title: 'Item 3'}},\r\n {properties: {title: 'Item 4'}},\r\n {properties: {title: 'Item 5'}},\r\n ]\r\n })]\r\n}));\r\n\r\nnav.open();\r\n{code}\r\n\r\nAnyway, we should fix the default value", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-01-10T20:17:50.000+0000", "updated": "2017-01-10T20:21:15.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }