Problem
The popover ignores its dimensions when you call hide() before show(), or when calling hide() multiple times.
How to Reproduce
1. Drop the following in an app.js.
2. Run it in the iOS 5 iPad simulator.
3. Click the white button in the sea of blackness, and you'll see a really big popover.
4. Click anywhere but on the popover or button to hide the popover.
5. Click the white button again to see the properly sized popover.
var breakPopoverSizing = true;
var win = Ti.UI.createWindow();
var popover = Ti.UI.iPad.createPopover({
height: 40, width: 40
});
if (breakPopoverSizing) {
popover.hide();
}
var button = Ti.UI.createButton({
title: '1. Touch Me ',
width: 200, height: 40
});
button.addEventListener('click', function() {
popover.show({ view: button });
});
win.add(button);
win.open();
This occurs in our apps as well, including released in-the-wild apps which were built on older SDK versions (1.5, 1.7). All discussion in the Q&A section about these issues are shut down instantly by moderators due to the Apple NDA, so we've been hoping that Appcelerator will listen to these issues once the NDA period expires (we hope..) Note: both the popover height and width is ignored - the height is basically full-height even when height is defined, and the width isn't respected either.
I saw this happening on an older SDK build, but it appears to be fixed in the latest 1.8 in github. (Tested on iPad2 with iOS5 beta)
Can someone point me at the git commit so I can merge back into 1.6.2 - 1.7.x and 1.8.x are way too unstable to use ?
As @Nick Milner says.. 1.7 still has problems that prevent upgrading from 1.6.. but merging 1.8's fix for this problem back into 1.6.2 might give a stable build which fixes this problem. I'm sure Appcelerator won't directly support this, but presumably we all know how to run a diff and poke around until we get it working :)
Yep, Agree William. I am already on a homebrew version of 1.6.2 plus back ports of other stuff. I don't expect support but am now stuck as the App i'm working on for a client was due to be submitted this Friday and IOS5 has broken lots of bits and pieces. A shame that although this bug has been apparent since the very first IOS5 beta its been overlooked/ignored.
Reggie, if it helps I discovered that on latest 1.8.x the popover width/height works if you don't use setPassThroughViews method
Got it. Updated original description with a reproducible test case and some additional details.
WORKS now in the customer's app as well as my own isolated test cases. Great fix, Reggie! version=1.8.0.1 timestamp=11/15/11 09:46 githash=3b241d9...
ios5, ipad2, 1.8.0.1 RC1, 10.6.8, xcode4.2
Reopening issue to add tag
Added tag.
Hi guys, I have issue same this problem With Ipad 2. I updated Titanium Mobile SDK 1.8.0 RC3;xcode4.2; Mac OSX 10.6.8 and built, but my app did not work on IPAD 2(App crashed when it's started) while it work on Ipad Simulator normally. I don't know? Please help me! Thanks so much!