First release of SwiftRichString was take place in December 2016; as many other works it’s born for my own needs; NSAttributedString  management is one of the part of UIKit which owes lots from the Objective-C heritage and even if something is changed with Swift 4 it still have plenty room of improvement to fit well in a post Swift world.

SwiftRichString introduced the concept of Style  to define and collect a type safe collection of attributes you can apply to a plain or already-attributed string. The new 2.x branch is a total rewrite of the library which suits better with protocol oriented programming approach with several room for future improvements.

View the article

As Apple’s developers we started facing the type-safe constraint in our code with the advent of Swift.

From my side I’ve always tried to fully embrace this approach even if often this means to come to a deal with several parts of the UIKit which are obviously created with a different – more dynamic – paradigm in mind.
Sometimes is easy, some other less, but they still a good excercise to think outside the box to keep our code safer and cleaner.

Recently I’ve re-faced an apparent trivial task; I would to read the configuration of an application saved inside the Info.plist file of the app.

View the article

Not so long ago I’ve published an article called “Forget datasource & delegate: a new approach to UITableView“; the title may appear as a bit pretentious but, believe me when I say I’m tired to fill-up datasource and delegates methods placeholders just to make a simple (or complex) table/collection.

I do not want to bore you with yet another article about massive view controllers but the whole thing is easy to become a big jumble when you want to implement some business logic and flexible rendering to represented data.

View the article

The secret world of NSTimer

In this article we’ll take a depth look at Timers and how it works; timer allows us to execute some piece of code after a timer interval one or more times. There are multiple types of clocks used to create timers and, even if apparently all ofthem run at the same rate, they still have different behaviours.

In the second part of this article I’ll present an NSTimer alternative made using GCD library which allows us to simplify our work with timer by removing memory management and thread constraints, also making our timer reusable and configurable.

View the article
@