如果我知道他的参数,我可以调用实现方法。例如
let method: Method = class_getInstanceMethod(owner.dynamicType, selector)
let implementation = method_getImplementation(method)
// if i known this ((String, String) -> NSString)
typealias Function = @convention(c) (AnyObject, Selector, String, String) -> Unmanaged<NSString>
let function = unsafeBitCast(implementation, Function.self)
let result = { title, message in function(owner, selector, title, message).takeUnretainedValue() }
但该怎么办,如果我以前不知道方法的类型?我能做点什么吗?也许可以将参数告诉为数组?