Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to perform aspect_hookSelector #55

Closed
avnerbarr opened this issue Jul 15, 2015 · 2 comments
Closed

Not able to perform aspect_hookSelector #55

avnerbarr opened this issue Jul 15, 2015 · 2 comments

Comments

@avnerbarr
Copy link

I want to hook to UIControl addTarget:action:forControlEvents but not able to

[UIControl aspect_hookSelector:@selector(addTarget:action:forControlEvents:) withOptions:AspectPositionAfter usingBlock:^(id<AspectInfo> aspectInfo, BOOL animated) {
                // the instance getting the callback
                NSLog(@"here");

            } error:&err];

            if (err) {
                NSLog(@"Err %@",err);
            }

But getting this error:

(lldb) po err
Error Domain=AspectErrorDomain Code=6 "Block signature <NSMethodSignature: 0x7fad2dc107e0> doesn't match <NSMethodSignature: 0x7fad2bdf4380>." UserInfo=0x7fad2bdf43c0 {NSLocalizedDescription=Block signature <NSMethodSignature: 0x7fad2dc107e0> doesn't match <NSMethodSignature: 0x7fad2bdf4380>.}
@steipete
Copy link
Owner

BOOL animated doesn't match the signature above (id,SEL,int)

@avnerbarr
Copy link
Author

My bad . sorry...
:)
Copy pasted from the example ....

Thanks for the quick reply!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants