[TIMOB-920] setHeight not working properly for popovers
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:54:40.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.4.0 |
Components | iOS |
Labels | n/a |
Reporter | Nolan Wright |
Assignee | Blain Hamon |
Created | 2011-04-15T02:39:13.000+0000 |
Updated | 2011-04-17T01:54:40.000+0000 |
Description
see:
http://helpdesk.appcelerator.net/tickets/2335">http://helpdesk.appcelerator.net/tickets/2335
if the popover is visible and i chance the height, it will not be reflected until the popover is hidden then shown again.
here's a test case:
var win = Ti.UI.createWindow();
var b0 = Ti.UI.createButton({
top:10,
width:300,
height:40,
title:'Open Popover'
})
var b1 = Titanium.UI.createButton({
width:129,
height:29,
top:12,
left:63,
title:'button 1'
});
var b2 = Titanium.UI.createButton({
width:105,
height:29,
top:12,
left:192,
title:'button 2'
});
var b3 = Titanium.UI.createButton({
width:114,
height:29,
top:12,
left:297,
title:'button 3'
});
var popover = Ti.UI.iPad.createPopover({
title:'Popover',
width:480,
height:156,
arrowDirection:Ti.UI.iPad.POPOVER_ARROW_DIRECTION_UP,
backgroundColor: '#fdf5e5'
});
popover.add(b1);
popover.add(b2);
popover.add(b3);
win.add(b0)
b0.addEventListener('click', function()
{
popover.show({view:b0, rect:{x:230,y:350}});
});
b1.addEventListener('click', function()
{
popover.setHeight(156);
});
b2.addEventListener('click', function()
{
popover.setHeight(320);
});
b3.addEventListener('click', function()
{
popover.setHeight(320);
});
win.open();
(from [915d08194ca7425867de0528003feca678d6d231]) Closes #920 . Setwidth and setHeight applies to the popup content size, including the navbar, not the TiWindow size within. Not only that, but UIPopoverController does some strange interactions with UIViewController, so that we must specifically set the view even though we shouldn't need to. http://github.com/appcelerator/titanium_mobile/commit/915d08194ca7425867de0528003feca678d6d231"> http://github.com/appcelerator/titanium_mobile/commit/915d08194ca74...