[TIMOB-709] size.height and size.width properties are 0 when height or width auto is used
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:53:59.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.3.0 |
Components | iOS |
Labels | n/a |
Reporter | Nolan Wright |
Assignee | Blain Hamon |
Created | 2011-04-15T02:34:56.000+0000 |
Updated | 2011-04-17T01:53:59.000+0000 |
Description
from premium support:
http://helpdesk.appcelerator.net/tickets/1762">http://helpdesk.appcelerator.net/tickets/1762
Partial fix for this that solves the user's problem:
You can't get these values before the window is drawn, because the autosize values are not computed until that time. So what you can do is:
Blain says this might not work for tableRowViews, however, since they are lazyload. This should solve the customer's problem however.
Leaving the bug open until we can come up with a tableRowView solution.
Closing this, it's just not possible to get useful size information without drawing all superviews (which, in the case of an element like a label, means drawing everything). The user can get the desired behavior by using code like the following:
Positioning elements based on other autosize elements has to be done on window open (and yes, they are redrawn correctly before display). Handling table rows is all done internally and the user should have no control over it. Create another bug if that becomes an issue.