AppDelegate的当前视图控制器? [英] Current view controller from AppDelegate?

查看:108
本文介绍了AppDelegate的当前视图控制器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法从AppDelegate获取当前视图控制器?我知道有rootViewController,但这不是我想要的。

Is there a way to get the current view controller from the AppDelegate? I know there is rootViewController, but that's not what I'm looking for.

推荐答案

如果你有UINavigationController进入appDelegate然后使用它property topViewController visibleViewController

If you have UINavigationController into appDelegate then use its property topViewController or visibleViewController

这篇关于AppDelegate的当前视图控制器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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