Posts in ios

Architecturing A/B Experiments

Making experiments on a product is one of the most powerful technique for a company to get the best response from its customers. But sometimes, especially when they are more than 2 or 3 at the same time, it may become a bit frustrating for developers who find pieces of experiment blocks around the whole project.
In this article I’ll explain an easy architectural approach to keep our code clean and dynamic.

written in a/b tests, architecture, best practice, ios, objective-c Read on →

Extending Methods in a Category by Method Swizzling

Probably you have been in the situation to being writing a category and at some point exclaim “F**K! It’s a category!”. Yes, and probably was because you accidentally tried to override a method without remembering that effectively, you were writing in a category.

In the largest percentage of situations, when you need to override a method, you want to write a subclass; when instead you want to write a category for a class, it is because you probably need to have some new methods or properties that you’d like to be used from every subclass.

There is only another situation which could confuse you, and this is when you are in both the previous cases, together.

written in categories, extending, ios, objective-c, swizzling, underthehood Read on →

Interaction Object

As a developer I often find myself in the situation where I have to face the problem to store and get some kind of information in the most possible handy way.
In particular, this happens when you design a static menu list (e.g side panel or harburger menu) using a UITableView.

In this article I will go to explain how to implement it using the concept of Interaction Object in order to keep our code clean and testable.

written in architecture, best practices, code, component, design, ios, objective-c Read on →

Autorelease - Under the Hood

Since this is an argument less touched but much important, I decided to write an article to organize the informations and explain how autorelease, or better autorelease pool works.

The main goal of this article is not to explain the base of what is an autorelease pool and when autorelease should be used, but anyway, this is really important to understand these concepts before proceeding. For this reason, the first paragraph will be dedicated to explain them. Experts developers, can safely skip it if they want.

written in arc, ios, mrc, objective-c, underthehood Read on →