How Does Super Work?

As Objective-C programmers, we encounter and use the super keyword on a daily basis. We know how it works and what to expect from it. Some metaprogramming approaches may, however, require a deeper understanding of its implementation.

Continue Reading

Applications as State Machines

Applications tend to have a set of states with various transitions between them. Modeling them as finite state machines can help disassemble the problem of building the whole application into several separate smaller parts. This separation can be further improved by maximizing the hermetization of the resulting components. One possible way to reduce coupling between the modules is to abstract out the transition logic into a separate entity, which I call the TransitionController.

Continue Reading

MVC Layer Interaction Architecture

Every day at Macoscope involves working on multiple big projects, often of high complexity. Each application has to synchronize with various remote services, manage loads of data, and display deeply complicated views with nontrivial interactions. To manage all of these functions, we need to split our code into many smaller chunks which have to interact with each other and keep in sync.

Continue Reading

Calling Blocks Inline

I’ve recently discovered an interesting use for blocks in Objective-C. It’s possible to call them inline right after the definition, just like you would do in javascript.

Continue Reading

iOS 7 Dynamic Type Simulator for Designers

Text Kit, introduced in iOS 7, gives us much more control over text than previous iOS releases; plus, its implementation is far easier. Bundled with Xcode 5, developers were handed a set of tools for text management and fine typography, comparable with tools available in industry standard DTP software like Adobe InDesign, the long-standing choice of designers everywhere.

Continue Reading

1/2