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 […]
When I first started using ReactiveCocoa (now ReactiveObjC), I mainly stuck to the basic operators: map, flatten, merge, etc. I saw a few examples of createSignal, but all I saw was a lot of manual work with disposables, subscribers, and other tedious sorts of things that I didn’t really want to mess with.
I have been developing software in Objective-C for quite some time now, but I continue to discover new ways to shoot myself in the foot, particularly in the way of memory management. A while back, I wrote a post about finding iOS memory leaks using Xcode’s Instruments. This is a great tool for discovering memory leaks […]
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 […]
It seems that despite your best efforts, at some point, you will have to track down a memory leak. In Objective-C, Automatic Reference Counting takes away much of the pain of memory management, but you still need to be careful to clean up after yourself.
In my previous post, I talked about using Value Objects in Objective-C projects. I gave an example of a Ruby DSL that could be used to specify the object’s properties so the code could be generated. In this post, I’ll go through some Ruby code that can turn that DSL into an Objective-C header and […]
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. […]
I know I’m a little late to the game, but I just recently started playing around with Swift, Apple’s new flagship language for developing apps for iOS, OS X and Apple Watch. Rather than starting a completely new project using only Swift, I thought it would be an interesting challenge to start with some Objective-C […]
Objection is a dependency injection framework for Objective-C that I wrote in one day 2011 while working on an iOS project. It’s funny how a combination of frustration with existing tools and inspiration can create something of value for your company and the wider development community. Objection turned 4 years old this year and has […]
In his Easy Asynchronous Operations in iOS with ReactiveCocoa post, John Fisher described how to use -flattenMap to chain together signals that wrap asynchronous operations. He also described a technique for serializing those chains of operations by executing the chain on a serial RACScheduler. The serial scheduler technique works in some situations, but I’ve run […]