来自app delegate的presentModalViewController [英] presentModalViewController from app delegate

查看:128
本文介绍了来自app delegate的presentModalViewController的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从app delegate的视图中呈现模态视图控制器,这是最顶级的?试图从UIView呈现一个模态视图控制器,这让我很困惑。

How can I present a modal view controller from the app delegate's view, the top most? Trying to present a modal view controller from a UIView, which made me confused.

推荐答案

应用程序代理不管理视图。您应该从 -application:didFinishLaunchingWithOptions:

Application delegates do not manage a view. You should present a modal view controller from the -viewDidAppear: method of the first view controller that gets put on screen in -application:didFinishLaunchingWithOptions:.

这篇关于来自app delegate的presentModalViewController的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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