{"id":8784,"date":"2014-05-06T16:38:37","date_gmt":"2014-05-06T20:38:37","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=8784"},"modified":"2014-05-06T16:38:37","modified_gmt":"2014-05-06T20:38:37","slug":"aspects","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2014\/05\/06\/aspects\/","title":{"rendered":"Aspects"},"content":{"rendered":"<p><a href=\"https:\/\/github.com\/steipete\/Aspects.git\">Aspects<\/a>:<\/p>\n<blockquote cite=\"https:\/\/github.com\/steipete\/Aspects\"><p>Delightful, simple library for aspect oriented programming by @steipete.<\/p>\n<p>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.<\/p>\n<p>[&#8230;]<\/p>\n<p>An important limitation is that for class-based hooking, a method can only be hooked once within the subclass hierarchy.<\/p>\n<p>[&#8230;]<\/p>\n<p>KVO works if observers are created after your calls <code>aspect_hookSelector:<\/code> It most likely will crash the other way around.<\/p><\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Aspects: Delightful, simple library for aspect oriented programming by @steipete. 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. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"","apple_news_api_id":"","apple_news_api_modified_at":"","apple_news_api_revision":"","apple_news_api_share_url":"","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[876,54,74,71],"class_list":["post-8784","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-aspect-oriented-programming-aop","tag-objective-c","tag-opensource","tag-programming"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/8784","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=8784"}],"version-history":[{"count":0,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/8784\/revisions"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=8784"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=8784"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=8784"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}