Simple state machine written in Objective-C for iOS 5.0 framework