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

前端 未结 13 1239
逝去的感伤
逝去的感伤 2020-11-30 08:22

What does this error indicate:

\"Popovers cannot be presented from a view which does not have a window.\"
13条回答
  •  独厮守ぢ
    2020-11-30 09:07

    Just encountered this issue. Turned out that the inView: parameter was using an IBOutlet that wasn't connected in IB. Thus, an attempt was made to launch the popover in nil. That doesn't work.

    So, make sure you are using a valid view.

提交回复
热议问题