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

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

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

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

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

大家讲道理
大家讲道理

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

répondre à tous(1)
左手右手慢动作

Parce que le - (void)viewDidAppear:(BOOL)animated de la classe XXViewController appelle la [super viewDidAppear:animated];méthode

Derniers téléchargements
Plus>
effets Web
Code source du site Web
Matériel du site Web
Modèle frontal