Quantcast
Channel: 睿论坛 - 最新话题
Viewing all articles
Browse latest Browse all 5735

Shortcut to find the ViewController's class name on the keyWindow

$
0
0

@everettjf wrote:

看了 http://objccn.io/issue-19-1/ 发现一个比使用 nextResponder 更快捷的获取 ViewController 的方法。

[[[UIWindow keyWindow] rootViewController] _printHierarchy].toString()

例如这是微信主界面。

不过是只支持iOS8之后的。

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 5735

Latest Images

Trending Articles



Latest Images