Skip to end of metadata
Go to start of metadata

Demonstrates how to use a PopOver control iPad devices to present temporary information.

Example App Source Location


You can find this example app in the Alloy repository under samples/apps/ui/popover. Check the instructions how to run these sample projects.

Popovers are used to present temporary information in a non-modal manner. The popover remains visible until the user taps outside of the popover window, or it is explicitly dismissed. The main index.xml view presents two buttons, "Popover" and "Popover with content view" that call the view-controller's openPopover() and openPopoverWithContentView(), respectively, when clicked.


The popover.xml and popover_with_window.xml views each declare a <Popover> element that, in turn, contains a <ContentView> element. The <ContentView> element contains the actual content that is displayed by the popup.


When a button on the main view is clicked, the main view-controller gets a reference to a popover XML view, and calls its show() method, passing it a PopoverParams object whose view property that specifies the view to which the popover should be anchored.


See also

  • No labels