views:

139

answers:

1

I am trying to present a Popover from a button in a UIModalPresentationPageSheet. It crashes the app and returns the following message to the console:

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Popovers cannot be presented from a view which does not have a window.'

My code works fine in a standard view controller. As the message suggests, there is something about the modal that prevents it displaying. I've done a fair amount of searching on this topic, but am not finding a solution. I have to believe it is possible, as I've seen something very similar in apps like 1Password.

Pointers and/or suggestions greatly appreciated.