Some of the top grossing games on the iPhone and iPad have been line/path drawing games with Flight Control and Harbor Master being among the most famous.
Here’s a tutorial by Jean-Pierre Distler that goes through process of creating a basic line drawing game using Sprite Kit.
The tutorial covers setting up the game background, the basic algorithm for drawing lines, getting the character to follow the drawn path and angle correctly, detect collisions and more.
Specifically you’ll learn how to:
In the builder pattern one creates a new objects using a dedicated builder object allowing you to avoid having to make multiple constructors, and greatly increasing the readability of your code when initializing complex objects.
This example from Klass Pieter Annema illustrates the builder pattern well with some code such as this:
builder.size = 12;
builder.pepperoni = YES;
builder.mushrooms = YES;
Pizza *pizza = [builder build];
And using a configuration block can become even simpler:
I’ve mentioned a number of interesting photo components lately, most recently a nice custom video and photo picker with filtering.
Here’s an open source component called EBPhotopages submitted by Eddy Borja that allows you to create a photo gallery with a wide variety of features, and is easily extendable.
EBPhotoPages use a state pattern so you can add new states for the gallery without modifying the underlying code.
Some time ago I mentioned a handy guide (way back in the iOS 4 days!) for using macros to accomodate users on different iOS versions.
Here’s a nice guide from Erica Sadun that provides a number of useful compiler directives customize the warnings and errors from Xcode’s clang compiler.
Among the tips you’ll find: