Using attributedText to Create a Single UILabel with Multiple Styles

Sometimes, a design requires a label to have multiple separate styles, while the code would be easier with one label or string. In this case, it’s useful to know about attributedText on UILabels. This approach lets you style strings without changing the style on the label directly. Below is a step-by-step guide for how to […]

ReactiveCocoa – Cleaning Up after replay, replayLast, and replayLazily

A while back, I wrote a post comparing replay, replayLast, and replayLazily. Thanks to some investigating by Brian Vanderwal, I recently learned that one needs to be careful when using a replay operator (or multicast/connect directly) with an infinite signal as its source. This blog post refers to the older ReactiveCocoa 2.x Objective-C library. I’m guessing that the […]

Simplifying Objective-C Value Objects with Mantle and the Builder Pattern

I’ve come to the conclusion that regardless of how “functional” a programming language is, the best way to handle state is with immutable value objects. Wikipedia defines a value object as follows: “In computer science, a value object is a small object that represents a simple entity whose equality is not based on identity: i.e. […]