Get Updates By E-mail 

Article Written By:
Johann Dowa

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.


  •  
  •  
  •  
  •  
  •  

Submit A Resource

Have you created a useful tutorial, library or tool for iOS development that you would like to get in front of our 300,000+ monthly page views from iOS developers?

You can submit the url here.

The resources we feel will appeal to our readers the most will be posted on the front page.

Comments