moaible / MOAspects

AOP Library for iOS
MIT License
163 stars 25 forks source link

Add Swift Interface #10

Closed moaible closed 9 years ago

moaible commented 9 years ago

Swift Interface

Interface

MOAspects.hookClassMethod(clazz:CLASS, selector:SEL, position:POSITION) {
    // hook something!
    // can use $0...$9 parameter
}

MOAspects.hookInstanceMethod(clazz:CLASS, selector:SEL, position:POSITION) {
    // hook something!
    // can use $0...$9 parameter
}

Parameter

Parameter Index Parameter summary
$0 hook target object
$1 hook method parameter1
$2 hook method parameter2
$3 hook method parameter3
$4 hook method parameter4
$5 hook method parameter5
$6 hook method parameter6
$7 hook method parameter7
$8 hook method parameter8
$9 hook method parameter9