Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19991] iOS: Pickers cannot be resized after layout

GitHub Issuen/a
TypeBug
PriorityNone
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 5.1.0
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterFokke Zandbergen
AssigneeAngel Petkov
Created2015-11-16T14:43:31.000+0000
Updated2015-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

FileDateSize
Simulator Screen Shot 16 Nov 2015 15.38.44.png2015-11-16T14:43:22.000+000054905

Comments

  1. Hans Knöchel 2015-11-16

    Is it only not resizable in the postlayout event or always after the view is added?
  2. Fokke Zandbergen 2015-11-16

    It can be set after creating:adding it but not after the window is open and the picker layed out.

JSON Source