[TIMOB-8122] iOS: Implement support for Ti.UI.INHERIT
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Medium |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2012-06-15T13:29:44.000+0000 |
Affected Version/s | Release 2.0.0 |
Fix Version/s | n/a |
Components | iOS |
Labels | parity |
Reporter | Bryan Hughes |
Assignee | Max Stepanov |
Created | 2012-03-20T14:46:47.000+0000 |
Updated | 2017-03-09T23:05:34.000+0000 |
Description
Ti.UI.INHERIT tells a control that it's width/height should be based on the parent's width/height, respectively. If the parent's width (for example) is SIZE, then the inherited width is SIZE, otherwise it is FILL. As a result, if a control inherits, the result will be either SIZE or FILL but nothing else. Another way to think about this is that inherit is a different type of "auto"...instead of looking to the controls default of FILL/SIZE, it looks to the parent to infer FILL/SIZE.
I ended up tweaking the behavior for inherit some to better match how I needed it to act, and how I think people will want to use it. The behavior I implemented is that if the parent's width (for example) is SIZE, then the inherited width is SIZE, otherwise it is FILL. As a result, if a control inherits, the result will be either SIZE or FILL but nothing else. Another way to think about this is that inherit is a different type of "auto"...instead of looking to the controls default of FILL/SIZE, it looks to the parent to infer FILL/SIZE. I feel that this will be more useful for developers (plus it just feels less...hacky), but I'm certainly open for discussion.
Closing ticket as invalid.