viezel / NappUI

A collection of extended functionality for the UI components of Titanium SDK
Other
121 stars 34 forks source link

Popover `.toggle()` method #15

Open sindresorhus opened 11 years ago

sindresorhus commented 11 years ago

Using Popovers in Titanium is annoying since there isn't any sane way to prevent multiple popovers from appearing if you hit the same button twice which executes popover.show().

It would be useful with a .toggle() method that worked like .show(), but if the popup were already visible it would hide it instead.

How: http://stackoverflow.com/questions/2642405/dismissing-ipad-uipopovercontroller-when-barbuttonitem-is-pushed-while-its-open

OptionDialog on iPad too, which is also a popover.