steipete / Aspects

Delightful, simple library for aspect oriented programming in Objective-C and Swift.
https://twitter.com/steipete
MIT License
8.4k stars 1.26k forks source link

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

Open dehengxu opened 2 years ago

Frizlab commented 2 years ago

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

ACEis commented 1 year ago

try to use like

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

您好,邮件已收到