2

In an iOS app, is it possible to display a popover behind other elements?

For example, if I have a UIView* myView already containing several subviews, and I create a new subview, UIView* popopverView, and call presentPopoverFromRect in the view popopverView, it still displays in front of the elements in the other subviews, even if I call [myView sendSubviewToBack:popoverView]

I have tested other elements such as buttons, and they display behind the other elements. Is it inherent for popovers to display on top of all subviews?

dave
  • 1,607
  • 3
  • 16
  • 20
  • possible duplicate of [Using MKAnnotationView without MKMapView?](http://stackoverflow.com/questions/1619245/using-mkannotationview-without-mkmapview) – dave Jun 28 '12 at 20:05

1 Answers1

2

From the documentation:

You use popovers to present information temporarily but in a way that does not take over the entire screen like a modal view does. The popover content is layered on top of your existing content in a special type of window. The popover remains visible until the user taps outside of the popover window or you explicitly dismiss it.

It is not possible to "hide" a UIPopoverController - you dismiss it (or the user does). Anyway, you shouldn't need to have other views appear on top of a UIPopoverController - that is its purpose.

Evan Mulawski
  • 54,662
  • 15
  • 117
  • 144
  • ...and that's why it is call a popOVER – spring Jun 28 '12 at 19:22
  • What I am really looking for is something that behaves similarly to a [MKAnnotation](http://developer.apple.com/library/ios/#documentation/MapKit/Reference/MKAnnotationView_Class/Reference/Reference.html), however, using the map framework is not appropriate in this context – dave Jun 28 '12 at 19:33
  • Found what I was looking for - see this question: http://stackoverflow.com/questions/1619245/using-mkannotationview-without-mkmapview – dave Jun 28 '12 at 20:04
  • While what Evan says is true 99.44% of the time, there are exceptions. For example, I'm trying to get a "tool tip" (a little bigger than that, but the same sort of idea) to pop-up over the popover. It's a one time (well, it has a "don't show again" button) thing. I could do it as a `UIAlertView`, but those are so ugly, so I'm trying to do it as custom-UI. And that's the legitimate case for UI-over-popover (but outside the bounds of the popover.) – Olie May 13 '15 at 00:22