Closed 3ign0n closed 9 years ago
@3ign0n Hmm..., See the error log was not?
I got no error in Xcode console. I'll write some example code later.
@3ign0n
It works great for ones written in Objective-C, but forwardInvocation intercepted blocks will not be called for some Swift class/instance method.
I was confirmed. It is natural Swift method is only not working.
It works like a charm to add 'dynamic' keyword to a function. It's my workaround.
forwardInvocation for a pure Swift class/function may not work in a certain condition, I'm not sure what it is, but the function with 'dynamic' keyword will be dynamically dispatched through the Objective-C runtime.
@3ign0n Thank you for reporting! I confirmed 'dynamic' keyword solves this problem.
Closed.
Hooking some subclasses of UITableView, written in swift, still fails. I don't know what's the difference between v0.1.4's behavior and v0.1.5's one. It works great for ones written in Objective-C, but forwardInvocation intercepted blocks will not be called for some Swift class/instance methods.