Objective-C Aspect Oriented Programming Library For Easier And Safer Method Swizzling

Earlier this year  I mentioned a nice guide on avoiding issues when performing method swizzling.

Here’s a library from Peter Steinberger for aspect oriented programming allowing you to enhance existing methods like swizzling with a number of advantages.

As Peter states in the readme:

Think of Aspects as method swizzling on steroids. It allows you to add code to existing methods per class or per instance, whilst thinking of the insertion point e.g. before/instead/after. Aspects automatically deals with calling super and is easier to use than regular method swizzling.

You can find Aspects on Github here.

There are some use cases posted on the Github page and Peter also has a writeup about using Aspects over on his blog.

An excellent objective-c enhancement.

FacebookTwitterDiggStumbleUponGoogle Plus

Original article: Objective-C Aspect Oriented Programming Library For Easier And Safer Method Swizzling

©2014 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.

Leave a Reply

Your email address will not be published. Required fields are marked *