[TIMOB-24574] iOS : Picker selectionIndicator is not visible
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Resolved |
Resolution | Cannot Reproduce |
Resolution Date | 2019-07-18T17:28:05.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 8.0.2 |
Components | iOS |
Labels | ios, picker |
Reporter | nicolomonili |
Assignee | Vijay Singh |
Created | 2017-04-12T13:34:38.000+0000 |
Updated | 2019-12-02T23:06:28.000+0000 |
Description
selectionIndicator of picker is not visible.
I try to set selectionIndicator = true in the creation of the picker, after adding the PickerRow, and after adding the picker to the window. Same result.
If i force an error (try button "btn" of the test code), the selectionIndicator appear.
Test code (from http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.Picker , adding the button)
Ti.UI.backgroundColor = 'white';
var win = Ti.UI.createWindow({
exitOnClose: true,
layout: 'vertical'
});
var picker = Ti.UI.createPicker({
top:50
});
var data = [];
data[0]=Ti.UI.createPickerRow({title:'Bananas'});
data[1]=Ti.UI.createPickerRow({title:'Strawberries'});
data[2]=Ti.UI.createPickerRow({title:'Mangos'});
data[3]=Ti.UI.createPickerRow({title:'Grapes'});
picker.add(data);
picker.selectionIndicator = true;
var btn = Ti.UI.createButton({
title : "TEST",
top : 10
});
btn.addEventListener("click", function(e){
Ti.API.info(test[0]);
});
win.add(picker,btn);
win.open();
// must be after picker has been displayed
picker.setSelectedRow(0, 2, false); // select Mangos
Attachments
File | Date | Size |
---|---|---|
after btn event.png | 2017-04-12T13:34:27.000+0000 | 35972 |
before btn event.png | 2017-04-12T13:34:27.000+0000 | 36051 |
Looks like a general iOS 10 issue (http://stackoverflow.com/questions/39564660/uipickerview-selection-indicator-not-visible-in-ios10). There are some workarounds though, but I'll talk to Apple first. Thanks!
PR (master): https://github.com/appcelerator/titanium_mobile/pull/8958 PR (6_1_X): https://github.com/appcelerator/titanium_mobile/pull/8959
Hello, Thanks for reporting the issue. I was able to verify the bug in latest SDK 6.0.3.GA.
Reopening because of failing unit-tests. We need to wait until Apple fixes it properly, or the fix will cause issues.
Unable to reproduce the issue under SDK 8.0.2.GA
Picker selectionIndicator is visible under SDK 8.0.2.GA