Skip to content

nguyenhunga5/MBSwizzler

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MBSwizzler

Simple class for method swizzling in Swift. Check example for more details.

Swizzle NSDictionary methods:

NSDictionary.swizzleMethodSelector("description", withSelector: "swizzled_Description", forClass: NSDictionary.classForCoder())

Swizzle custom class methods:

MyClass.swizzleMethodSelector("testWithParameter:", withSelector: "swizzled_testWithParameter:", forClass: MyClass.classForCoder())

Swizzle static methods:

MyClass.swizzleStaticMethodSelector("testClassMethod", withSelector: "swizzled_testClassMethod", forClass: MyClass.classForCoder())

Note: Custom class should be inherited from NSObject

About

Simple class for method swizzling in Swift

Resources

Stars

Watchers

Forks

Packages

No packages published