NSObject+ImpChange.h 760 B

12345678910111213141516171819202122232425
  1. //
  2. // NSObject+ImpChange.h
  3. // assemble
  4. //
  5. // Created by apple on 2020/11/2.
  6. // Copyright © 2020 kingsunsoft. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. NS_ASSUME_NONNULL_BEGIN
  10. @interface NSObject (ImpChange)
  11. /**
  12. * 交换两个函数实现指针 参数均为NSString类型
  13. *
  14. * @param systemMethodString 系统方法名string
  15. * @param systemClassString 系统实现方法类名string
  16. * @param safeMethodString 自定义hook方法名string
  17. * @param targetClassString 目标实现类名string
  18. */
  19. + (void)SwizzlingMethod:(NSString *)systemMethodString systemClassString:(NSString *)systemClassString toSafeMethodString:(NSString *)safeMethodString targetClassString:(NSString *)targetClassString;
  20. @end
  21. NS_ASSUME_NONNULL_END