无法从没有窗口的视图中呈现弹出窗口 [英] Popovers cannot be presented from a view which does not have a window

查看:85
本文介绍了无法从没有窗口的视图中呈现弹出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此错误表示:


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


推荐答案

您要添加popover的视图必须已添加到窗口使用addSubview:方法。

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

尝试等待

- (void) didMoveToWindow

为视图调用

然后加载popover

is called for the view and then load the popover

这篇关于无法从没有窗口的视图中呈现弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆