INPopoverController
INPopoverController copied to clipboard
fix for issue 28
The _popoverWindow gets into a state where isVisible is YES, but alphaValue is 0 Because popoverIsVisible is true in togglePopover, it will always attempt to close it, never opening it and setting alpha back to 1.0
This seems to be happening because of a race condition where the animation delegate is set to nil before the animation started in INPopoverWindow.dismissAnimated is finished. So INPopoverController animationDidStop is never called.
It isn't really a thread synchronization issue because all this happens on the main thread.