Skip to content
This repository has been archived by the owner on Feb 6, 2021. It is now read-only.

Swizzling an instance method on the same instance twice causes it be to applied to all instances. #3

Open
chrislconover opened this issue May 6, 2014 · 1 comment

Comments

@chrislconover
Copy link

Description:

  • Swizzling an instance method on an instance twice (or at least more than once) causes the swizzling to be applied to all instances of the instance/object class.

Expected behavior:

  • Overwrite existing method.

Notes:

  • I realize that the above sequence is ill advised, but discovered the issue during prototyping.
  • For all it's worth, the REKit project has decent semantics, though buggy. Your syntax for defining overrides and calling the base implementation is much cleaner though.
  • One nice feature to have (unless I missed it), is to be able to simply inject a new method altogether, without swizzling to another, per se.

Thanks, and great library!

@JonasGessner
Copy link
Owner

I'll check this out once I have time. Could you fork the repo and fix it yourself, then send a pull request? That would be great help!

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

No branches or pull requests

2 participants