Aspects icon indicating copy to clipboard operation
Aspects copied to clipboard

Aspects how to hook instance method for all concrete class instances?

Open dehengxu opened this issue 2 years ago • 3 comments

dehengxu avatar Jun 15 '22 09:06 dehengxu

If I’m not mistaking that’s method-swizzling, not isa-swizzling. Aspects is about isa-swizzling AFAIK, not method-swizzling.

Frizlab avatar Jun 15 '22 13:06 Frizlab

try to use like

[UIViewController aspect_hookSelector:@selector(viewWillLayoutSubviews) withOptions:0 usingBlock:^{
    NSLog(@"Controller is layouting!");
} error:NULL];

ACEis avatar Jan 03 '23 06:01 ACEis

您好,邮件已收到

godLoveY avatar Jan 03 '23 06:01 godLoveY