Mon, Apr 20
NSNumberFormatter Singleton in Swift

Adam DeLong describes how to create a singleton in Swift using NSNumberFormatter. The goal is a quick and efficient way to convert integers to a currency format, such as $99.00

“…initializing an NSNumberFormatter can be an expensive operation, I didn’t want the performance of the app to be affected by this, especially if I was going to be using the same NSNumberFormatter configuration throughout the app. So, I decided to use a singleton.”

Adam includes a screencast as well as text description of the steps.

Fri, Apr 17
Asynchronous Image Downloading and Caching in Swift

Inspired by the popular asynchronous image downloader SDWebImage, Wei Wang created Kingfisher:

“A lightweight and pure Swift implemented library for downloading and caching image from the web.”

There are also a few handy customizations: max size/duration, cancel download, background image decompression and using the library as a category of UIImageView.

Thu, Apr 16
Caesar Cipher in Swift

Although there may be limited uses in the big picture, the cipher algorithms and correlating unit tests, written by Josh Smith, provide for an interesting read.

The name Caesar cipher refers to the origin of the encryption technique – it was the algorithm used to protect Julius Caesar’s personal correspondence.

View Debugging in Xcode 6

Scott Berrevoets provides a thorough walk-through of the view debugging capabilities in Xcode 6.

“Instead of printing frames to the console and trying to visualize layouts in your head, you’re now able to inspect an entire view hierarchy visually – right from within Xcode.”

Wed, Apr 15
Apple’s Open Source ResearchKit

Apple has released ResearchKit, an open source framework designed to facilitate design and development of apps primarily involving medical studies.

Peter Steinberger offers a solid introduction and shares his own observations of the new framework.