-
Notifications
You must be signed in to change notification settings - Fork 417
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
- jr_swizzleMethod:withMethod:error: does not work on iOS7 sometimes #8
Comments
You may experiment a method caching issue : the ObjC runtime aggressively caches implementations for selectors. My experience on the topic is not profound, I have just noticed that sometimes the runtime behaves just as if the IMP cache would prevent swizzling to work. Maybe iOS7 caches even more aggressively. As a consequence, I generally swizzle as soon as I can, before any instance of swizzled classes have been allocated. |
But I swizzled in the +load method of a UIAlertView category, it is early enough. |
My hypothesis looks wrong, then. It could have been your solution, though :-) I'm sorry, I don't know much more. I guess @rentzsch is much more aware than I am of the swizzling subtleties. |
Thank you :) |
BTW, you may check the result of |
Yes, I checked, but no error! |
I came across this from a google search as I am having a problem with -dismissWithClickedButtonIndex:animated: on iOS 7. You may find that the problem is not with the swizzling but with the fact that -dismissWithClickedButtonIndex:animated: just doesn't work. |
- jr_swizzleMethod:withMethod:error: seems does not work on iOS7 sometimes;
The text was updated successfully, but these errors were encountered: