Search code examples
ipaduipopovercontroller

Popovers cannot be presented from a view which does not have a window


What does this error indicate:

"Popovers cannot be presented from a view which does not have a window."

Solution

  • the view you're adding the popover to has to already have been added to a window with the "addSubview:" method.

    Try waiting until

    - (void) didMoveToWindow
    

    is called for the view and then load the popover