{ "id": "99627", "key": "TIMOB-10564", "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": [ { "id": "15107", "description": "2013 Sprint 09", "name": "2013 Sprint 09", "archived": true, "released": true, "releaseDate": "2013-05-06" } ], "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": "2013-05-06T08:34:41.000+0000", "created": "2012-08-22T16:11:38.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "core", "layout" ], "versions": [ { "id": "13572", "description": "Release 2.1.1", "name": "Release 2.1.1", "archived": true, "released": true, "releaseDate": "2012-07-31" } ], "issuelinks": [], "assignee": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-23T19:03:40.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h2. Problem description\r\nWhen a View is child of TableViewRow, it becomes impossible to resize it dynamically. Parameters width and height are actually changed, but the view inside the app does not change.\r\n\r\nh2. Steps to reproduce\r\n1. Test out this app:\r\n\r\n{code}\r\n// make a window to test in\r\nvar win = Ti.UI.createWindow( { backgroundColor: 'white' } );\r\nwin.open();\r\n\r\n\r\n\r\n// WINDOW VIEW (works)\r\nvar wView = Ti.UI.createView( {\r\n backgroundColor: 'yellow',\r\n width: 150,\r\n height: 150,\r\n top: 25\r\n} );\r\nwin.add( wView );\r\nvar wViewToggle = false;\r\nwView.addEventListener( 'click', function () {\r\n wViewToggle = !wViewToggle;\r\n if ( wViewToggle ) {\r\n wView.backgroundColor = 'blue';\r\n wView.width = 100;\r\n wView.height = 100;\r\n } else {\r\n wView.backgroundColor = 'yellow';\r\n wView.width = 150;\r\n wView.height = 150;\r\n }\r\n\r\n Ti.API.info( 'wView.width = ' + wView.width );\r\n Ti.API.info( 'wView.height = ' + wView.height );\r\n\r\n} );\r\n\r\n\r\n\r\n// TABLE VIEW (broken)\r\nvar table = Ti.UI.createTableView( {\r\n top: 200\r\n} );\r\nwin.add( table );\r\nvar row = Ti.UI.createTableViewRow( {\r\n backgroundColor: 'red',\r\n selectionStyle: 'none',\r\n height: Ti.UI.SIZE\r\n} );\r\ntable.data = [ row ];\r\nvar tView = Ti.UI.createView( {\r\n backgroundColor: 'yellow',\r\n width: 200,\r\n height: 200\r\n} );\r\nrow.add( tView );\r\nvar tViewToggle = false;\r\ntView.addEventListener( 'click', function () {\r\n tViewToggle = !tViewToggle;\r\n if ( tViewToggle ) {\r\n tView.backgroundColor = 'blue';\r\n tView.width = 100;\r\n tView.height = 100;\r\n } else {\r\n tView.backgroundColor = 'yellow';\r\n tView.width = 150;\r\n tView.height = 150;\r\n }\r\n\r\n Ti.API.info( 'tView.width = ' + tView.width );\r\n Ti.API.info( 'tView.height = ' + tView.height );\r\n\r\n} );\r\n{code}\r\n\r\n\r\nClicking on the squares, the result should be a resize of the view; while the square on top works (view is inside the window), the second does not (view inside tableviewrow).", "attachment": [], "flagged": false, "summary": "iOS: Cannot dynamically resize a View inside a TableViewRow", "creator": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "environment": "iOS 5.1\r\nSDK 2.1.1", "comment": { "comments": [ { "id": "240917", "author": { "name": "omri@matchspotapp.com", "key": "omri@matchspotapp.com", "displayName": "Omri Shaked", "active": true, "timeZone": "Asia/Gaza" }, "body": "Another code example that reproduces:\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor : \"white\"\r\n});\r\n\r\nvar tableView = Ti.UI.createTableView({\r\n\theight : \"100%\",\r\n\twidth : \"100%\",\r\n\tbackgroundColor : \"transparent\",\r\n\tseparatorStyle : Titanium.UI.iPhone.TableViewSeparatorStyle.NONE,\r\n});\r\n\r\nvar row = Ti.UI.createTableViewRow({\r\n\theight : Ti.UI.SIZE,\r\n\tselectionStyle : Titanium.UI.iPhone.TableViewCellSelectionStyle.NONE,\r\n});\r\n\r\nvar externalView = Ti.UI.createView({\r\n\theight : Ti.UI.SIZE,\r\n\twidth : \"100%\",\r\n\ttop : 20,\r\n});\r\n\r\nvar middleView = Ti.UI.createView({\r\n\theight : Ti.UI.SIZE,\r\n\twidth : \"100%\",\r\n\ttop : 0,\r\n});\r\n\r\nvar innerView = Ti.UI.createView({\r\n\theight : 50,\r\n\twidth : \"100%\",\r\n\ttop : 0,\r\n\tbackgroundColor : \"red\",\r\n});\r\n\r\nmiddleView.add(innerView);\r\nexternalView.add(middleView);\r\nrow.add(externalView);\r\ntableView.data = [row];\r\nwin.add(tableView);\r\n\r\nwin.open();\r\n\r\nsetTimeout(function() {\r\n\tinnerView.height = 200;\r\n}, 5000);\r\n\r\nsetTimeout(function() {\r\n\tTi.API.info(\"==============================\");\r\n\tTi.API.info(\"Inner view height : \" + innerView.size.height);\r\n\tTi.API.info(\"Middle view height : \" + middleView.size.height);\r\n\tTi.API.info(\"External view height: \" + externalView.size.height);\r\n\tTi.API.info(\"==============================\");\r\n}, 7000);\r\n{code}", "updateAuthor": { "name": "omri@matchspotapp.com", "key": "omri@matchspotapp.com", "displayName": "Omri Shaked", "active": true, "timeZone": "Asia/Gaza" }, "created": "2013-03-06T09:19:11.000+0000", "updated": "2013-03-06T09:19:11.000+0000" }, { "id": "240918", "author": { "name": "omri@matchspotapp.com", "key": "omri@matchspotapp.com", "displayName": "Omri Shaked", "active": true, "timeZone": "Asia/Gaza" }, "body": "Forgot to mention, happens on iOS 6.1 with SDK 3.0.0.GA.\r\n\r\nIssue should be updated with the SDK and iOS.", "updateAuthor": { "name": "omri@matchspotapp.com", "key": "omri@matchspotapp.com", "displayName": "Omri Shaked", "active": true, "timeZone": "Asia/Gaza" }, "created": "2013-03-06T09:20:18.000+0000", "updated": "2013-03-06T09:20:18.000+0000" }, { "id": "250280", "author": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "body": "cannot reproduce\r\n\r\nTested with\r\nTitanium Studio, build: 3.0.1.201212181159\r\nTitanium SDK version: 3.1.0\r\niOS iPhone Simulator: iOS SDK version: 6.0", "updateAuthor": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-06T08:34:41.000+0000", "updated": "2013-05-06T08:34:41.000+0000" }, { "id": "258941", "author": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Issue does not reproduces\n\nTested with\n\niOS SDK: 5.1\niOS iPhone Simulator: 5.1\nMac OS X Version 10.7.5\nTitanium SDK version 3.1.1.v20130606121419\nTitanium Studio, build: 3.0.1.201212181159", "updateAuthor": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-21T06:02:51.000+0000", "updated": "2013-06-21T06:02:51.000+0000" }, { "id": "415346", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as \"Cannot Reproduce\" with reference to the above comments.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-23T19:03:40.000+0000", "updated": "2017-03-23T19:03:40.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }