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

前端 未结 13 1238
逝去的感伤
逝去的感伤 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:13

    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

提交回复
热议问题