Open Assuner-Lee opened 6 years ago
Nice work @Assuner-Lee , I can confirm this works! I used it to swizzle:
[MFMailComposeViewController canSendMail]
Been looking for this for awhile!
@Assuner-Lee @varun531 If had hooked a static method using the above method, then you try to hook a instance method and call the instance method, it would be crashed!
May you can also try Stinger https://github.com/eleme/Stinger
@Assuner-Lee @varun531 If had hooked a static method using the above method, then you try to hook a instance method and call the instance method, it would be crashed!
May you can also try Stinger https://github.com/eleme/Stinger
get meta-Class from class :
Class cls = object_getClass(self.class);
hook: [cls aspect_hookSelector:selector withOptions:options usingBlock:block error:error];
!!!!!!!