[TIMOB-19991] iOS: Pickers cannot be resized after layout
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | None |
| Status | Open |
| Resolution | Unresolved |
| Affected Version/s | Release 5.1.0 |
| Fix Version/s | n/a |
| Components | iOS |
| Labels | n/a |
| Reporter | Fokke Zandbergen |
| Assignee | Angel Petkov |
| Created | 2015-11-16T14:43:31.000+0000 |
| Updated | 2015-12-05T12:40:01.000+0000 |
Description
With TIMOB-19203 we now support resizable pickers, but the following sample demonstrates that the height cannot be changed after layout. This might be either a code or documentation bug.
var win = Ti.UI.createWindow({
backgroundColor: 'red'
});
var picker = Ti.UI.createPicker({
top: 100,
type: Ti.UI.PICKER_TYPE_DATE,
height: 50
});
win.add(picker);
var picker2 = Ti.UI.createPicker({
top: 200,
type: Ti.UI.PICKER_TYPE_DATE
});
picker2.height = 50;
win.add(picker2);
var picker3 = Ti.UI.createPicker({
top: 300,
type: Ti.UI.PICKER_TYPE_DATE
});
picker3.addEventListener('postlayout', function(e) {
console.log('postlayout');
picker3.height = 50;
});
win.add(picker3);
win.open();
Attachments
| File | Date | Size |
|---|---|---|
| Simulator Screen Shot 16 Nov 2015 15.38.44.png | 2015-11-16T14:43:22.000+0000 | 54905 |
Is it only not resizable in the postlayout event or always after the view is added?
It can be set after creating:adding it but not after the window is open and the picker layed out.