Skip to content

Instantly share code, notes, and snippets.

@MathVasc
Created June 8, 2020 18:18
Show Gist options
  • Select an option

  • Save MathVasc/d277fca6dcf91fe0f15e6e09757efad3 to your computer and use it in GitHub Desktop.

Select an option

Save MathVasc/d277fca6dcf91fe0f15e6e09757efad3 to your computer and use it in GitHub Desktop.
PrepareToSwizzle
let aClass: AnyClass? = object_getClass(SomeClass())
let selector1: Selector = #selector(SomeClass.someMethod)
let selector2: Selector = #selector(SomeClass.someOtherMethod)
let method1: Method? = class_getInstanceMethod(aClass, selector1)
let method2: Method? = class_getInstanceMethod(aClass, selector2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment