ios - 在super class category的+load()方法里使用method swizzling 可以影响到它的子类
大家讲道理
大家讲道理 2017-04-18 09:15:58
0
1
564

利用method swizzling 来log用户行为路径

↑↑↑ 这篇文章在UIViewController的category里replacement ViewDidAppear方法,可以影响到子类的ViewDidAppear方法。

我不明白XXViewController调用viewDidAppear的方法的时候怎么就可以到调用到UIViewController里面的swizzling_viewDidAppear方法呢。

那黑魔法替换的不是UIViewController自己的2个IMP吗?怎么就可以影响到子类了呢?

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(1)
左手右手慢动作

Because of the - (void)viewDidAppear:(BOOL)animated 里面调用了 [super viewDidAppear:animated];method

of the XXViewController class
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template