[AC-1425] iOS : iPad cannot show a popover with tableView as its contentView
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2014-06-27T23:17:04.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | ios |
Reporter | David He |
Assignee | Mauro Parra-Miranda |
Created | 2014-06-23T12:37:53.000+0000 |
Updated | 2016-03-08T07:37:51.000+0000 |
Description
Code snippet below shows the problem - {color:red}Unable to display popover; view is not attached to the current window{color}
var win = Ti.UI.createWindow();
var table = Ti.UI.createTableView({
rowHeight : 40
});
var row = Ti.UI.createTableViewRow({
});
var tf = Ti.UI.createTextField({
hintText : "Title",
left : 5,
right : 5,
editable : false
});
row.add(tf);
table.setData([row]);
table.addEventListener('click', function(e) {
Ti.API.info('You clicked row ' + e.index);
Ti.API.info('source ' + e.source);
Ti.API.info(JSON.stringify(e.row));
var popover = Ti.UI.iPad.createPopover({
width : 250,
height : 100,
title : 'a POpover',
});
popover.contentView = Ti.UI.createTableView({
data : [{
title : "Mr."
}, {
title : "Dr."
}, {
title : "Ms."
}, {
title : "Mrs."
}],
rowHeight : 40
});
//popover.show({view:e.source});
popover.show();
});
win.add(table);
win.open();
Why is this ticket closed??? IT IS NOT RESOLVED IN SDK 3.2.3. Did you not see my environment????
Also, this ticket is different the one you mentioned, my one is trying to set the tableview to the contentView attribute
Hello [~jialhe85@gmail.com], I did some testing like this:
and works just fine with 3.3.0.Beta. Best, Mauro
Thanks Mauro I will re-test it using 3.3.0 beta