MOAspects icon indicating copy to clipboard operation
MOAspects copied to clipboard

I tried to hookInstanceMethodForClass at MOAspectsPosition.After in swift2, but method called before method call.

Open bloodysnowx opened this issue 9 years ago • 0 comments

MOAspects.hookInstanceMethodForClass(SearchViewController.TableViewDelegateImpl.self, selector: "tableView:didSelectRowAtIndexPath:", position: MOAspectsPosition.After) { (obj:AnyObject?) -> Void in
    someMethod1()
}

class SearchViewController : UIViewController {
    class TableViewDelegateImpl : NSObject, UITableViewDelegate {
        override dynamic func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
        someMethod2()
    }
}

I tried to hookInstanceMethodForClass at MOAspectsPosition.After in swift2 with Xcode7, but method called before method call. And this code was working right in swift1.2 with Xcode6.

bloodysnowx avatar Oct 01 '15 10:10 bloodysnowx