Building A Reorderable UICollectionView
Oct 12, 2021, 1:00 AM
Discusses a technique for building a reorderable `UICollectionView` using only stock UIKit APIs.
Attaching A Core Data SQLite Database To A Failed Test
Sep 2, 2021, 1:00 AM
Discusses a technique for attaching a SQLite database to a failed test.
Simplifying Core Data Unit Testing
Aug 28, 2021, 1:00 AM
Let's look at a technique for setting up unit tests where each test method executes against a completely isolated NSPersistentContainer backed by a SQLite persistent store.
A Technique For Creating a NSPersistentContainer
Aug 24, 2021, 1:00 AM
Shows how to create a `NSPersistentContainer` based on a `NSManagedObjectModel` and backed by a SQLite persistent store.
Using `XCTAttachment` To Debug Failing Tests
Aug 14, 2021, 1:00 AM
Quick introduction showing how to attach resources to your XCTests using XCTAttachment
8 Tips To Help You Get Started With Publish
Feb 25, 2020, 1:00 AM
A few tips and tricks to help you improve your `Publish` generated site
Publish: A Swift static site generator
Feb 7, 2020, 1:00 AM
This site is now published using Publish
Aug 18, 2018, 1:00 AM
Building async workflows using `NSOperation`, `NSOperationQueue` and `NSProgress`
Feb 10, 2018, 1:00 AM
Tips for refining ObjC methods for Swift
Add Drop Shadow To UIVisualEffectView
May 15, 2017, 1:00 AM
Recipe for adding a drop shadow to a `UIVisualEffectView`
Visualize iOS 10 Maps App View Hierarchy In Xcode
May 14, 2017, 1:00 AM
Helping to answer the question, "How did Apple do that?"
Aug 7, 2016, 1:00 AM
The power of domain-specific type wrappers
Swift Parameterized XCTest Test Case
Nov 28, 2015, 1:00 AM
Building parameterized test cases even when the compiler says "nope"
Swift Integer Overflow
Nov 19, 2015, 1:00 AM
How to overflow with Swift integer joy
Swift Protocol That Returns An Object Conforming To A Protocol
Nov 14, 2015, 1:00 AM
I am deep in the woods converting an existing Objective-C app to Swift. This post shows how to convert an Objective-C protocol that returns an object conforming to a protocol to Swift. Pay special attention to the typealias used in the...
Resetting Xcode Simulators
Nov 9, 2015, 1:00 AM
One of my projects utilizes really large files (gibabyte size). Those files end up in numerous simulators taking up precious storage. Here's a quick way to blow away all simulator data.$ xcrun simctl erase all
That's not too hard to...
Core Data Localization
Aug 5, 2015, 1:00 AM
I have been slowing migrating one of my apps to Swift. This post contains a few Swift extensions that help simplify working with Core Data's localization API. The Swift code, for the most part, is a direct port from existing Objective-C...
Creating Core Data Objects In Swift
Aug 1, 2015, 1:00 AM
Core Data relies heavily on string-based APIs, which makes it cumbersome to create type safe code. Most developers end up creating factory methods, macros and other conveniences to improve working with Core Data.I like to use an...
Aug 19, 2013, 1:00 AM
Failing fast is the decision to abort a running application when the application encounters a bad state. The decision, however, to abort a running application is often difficult. This post does not attempt to convince you to adopt a fail...
Xcode Run Scripts
Jun 20, 2013, 1:00 AM
Xcode provides a mechanism to run custom scripts when building a target.Select your project fileSelect your app's targetSelect "Build Phases"Tap "Add Build Phase"Select "Run Script"Code Convention Violation ScriptMy current client project...
Jun 9, 2013, 1:00 AM
A few days ago I read a STL Lambda Lounge post about Counting DNA Nucleotides. After solving the Nucleotides problem in Objective-C, I decided to solve a slightly different problem. I decided to count and print the number of times each...
Using Git Sparse Checkout
Jun 5, 2013, 1:00 AM
There are times when all I want or need from a Git repo are a handful files. For example, I use the awesome git-completion and git-prompt scripts included in the Git project. Thus, I don't need the entire Git repo taking up space.This is...
OCUnit Tip: You Only Need a .m File
Apr 25, 2012, 1:00 AM
If you are writing OCUnit tests, then you should only have a source (.m) file. There is no need for a header (.h).Why no header (.h)?test cases are, by nature, private implementation detailsno need for a public interface (test cases are...
Unit Testing with 'Latches'
Nov 21, 2011, 1:00 AM
Writing unit tests for single thread "logic" code is pretty easy. However, there are times when the code under test must execute on a background queue/ thread. This article shows a technique using "latches" to coordinate test execution...
Nov 1, 2011, 1:00 AM
My friend and colleague, Dr. Weiqi Gao (@weiqigao), suggested, during the October 2011 West St. Louis CocoaHeads meeting, that I add a Lissajous curve example to my Core Animation Fun House app. The source for the curve editor is now...
Core Animation Fun House
Oct 28, 2011, 1:00 AM
I recently gave a talk on Apple's Core Animation framework at the West St. Louis CocoaHeads group. The source code is available on GitHub. Topics include:Layers, Geometry, and Layer TreesImplicit Animations (size, position, color,...
My Top 6 Programming Book Recommendations
Sep 24, 2011, 1:00 AM
I often ask other people what books they are currently reading. I thought you might benefit from knowing what I have been reading in 2011. Below are some selected books--in no particular order--I am currently reading/ studying.Cocoa Design...
OCUnit Parameterized Test Case
Aug 30, 2011, 1:00 AM
This article shows how to implement a "Parameterized" (a.k.a data-driven) test case in the OCUnit test framework. The example described in this article is similar to the technique used in the Java Extreme Programming Cookbook, which I...