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
get self object #5
Comments
Hi, I think you have the animate and sender arguments of your intercept back to front. The first argument is “self” then any arguments. If this doesn’t work, can you send me a small example project? |
It works great....thank you very much... [Xtrace forClass:[UIViewController class] before:@selector(viewDidLoad:) callback:@selector(beforeViewDidLoad:)]; Then I go and add in my PlayersViewController this code : The problem is when I put an interceptor to the class UIViewController which the mother class for all views I get the message "begin players view did load" in my console log before executing the interception callback method. How could I fix this issue ? Thanks again |
Thanks, It is working... |
You’d need to do something like:
|
Thanks a lot ! it works |
Hello,
Thanks for the XTrace projet, it is awesome !!!
Simply I would like to know how could I get the self object from which the method is intercepted.
Here is an example :
I would like to intercept the before of any UIViewController subclass, so I added this code :
[Xtrace forClass:[self class] before:@selector(viewWillAppear:) callback:@selector(beforeViewWillAppear:sender:)];
When I go to my interception method and I would like to display sender, It says that this object is always (null) :
+(void)beforeViewWillAppear:(BOOL)animated sender:(id)sender {
NSLog(@"%@",sender);
}
How could I pass the sender object to my interceptions methods in my delegate ?
Thanks in advance.
The text was updated successfully, but these errors were encountered: