22

I rarely use comments when I’m coding1. I do make one exception though; using // TODO: and // FIXME: to highlight pieces of code I need to revisit at a later date.

Jeffrey Sambells wrote a post on how to flag these comments as Xcode warnings but that only applies for Objective-C. With a slight tweak, here is a run script build phase for flagging TODO: and FIXME: as warnings in a Swift project.

Read More »

22
22
22

Syntax can become extremely verbose when working with many APIs in the iOS SDK with Swift, and Quartz is no exception.

Here’s a library that provides a more convenient syntax when using Swift with Quartz and related frameworks such as Core Image, and Core Graphics called SwiftGraphics from Jonathan Wight.

Here’s some of the features provided by SwiftGraphics:

  • Operator overloading for CoreGraphics types
  • Quadtree data structures
  • Object oriented extensions for CGContext and CGPath
  • Easy creation of geometry objects
  • Convex hull generation
  • An Xcode 6 playground
22

Here’s a nice straightforward (about 35 minutes) step-by-step video tutorial series that explains how to create a simple Dribbble client app using UICollectionView submitted by Tope Abayomi.

Specifically in the series you’ll learn how to:

  • Get your Dribbble key
  • Use NSURLSession to download data from Dribbble
  • Parse the JSON response from the Dribbble API in Swift
  • Display the downloaded data and images in a UICollectionView
  • Load the images asynchronously

Read More »

22

There’s a chance you’ve heard a term floating around with some of the more functional-minded languages. The term is “curry” and not only is it a delicious Southeastern Asian cuisine, it also refers to translating the evaluation of a function that takes multiple arguments into evaluating a sequence of functions, each with a single argument. Obviously.

Let’s take a quick walk through the world of function currying in Swift, figure out what that nonsense above really means, and then see how we could use this technique in the real world.

Read More »

22
22

Anyone with an interest in Apple Watch development who hasn’t already begun to play with WatchKit will enjoy Clifton’s talk, which is just under 39 minutes long. Watch and learn! If you’d like the source code Clifton used for the demonstration, it’s available on Github.

Read More »

22

Working with UITableView requires a lot of boilerplate code and here’s a helper library for working with UITableView submitted by Le Van Nghia called MyTableViewManager.

MyTableViewManger was created to reduce the code required when using UITableView allowing table view management with UITableViewDelegate and UITableViewDataSource and some other nice features.

Some of the features of MyTableViewManager include:

  • Easy updating of cells
  • Dynamic cell height support
  • Header/Footer view support
  • Load more support
  • Support for interface builder

An example project is included and there are a number of usage examples in the readme.

Read More »

22

Dabble in Swift for long and the functional programming paradigm will most certainly appear on your radar. From conferences to books to blog posts, I’ve seen a lot in the functional programming arena as it relates to Swift.

As I seek to improve my functional programming thought processes and to practice what I’m learning, I found myself struggling with a fundamental concept: immutability. Especially when I’m designing something that, at the very least, appears to require the ability to change state at some point in time.

Read More »