Gestures can act as functional input shortcuts. Simple gestures like swiping and scrolling are built into many Apple UI tools. Some games, notably Castlevania: Dawn of Sorrow (DS) and Okami (PS2, Wii) use gestures as core gameplay mechanics. In this recipe, we will implement a simple and admittedly crude gesture system.
Please refer to the project RecipeCollection01 for full working code of this recipe. Also note that the
GestureShapeLayer classes have been omitted for brevity.
GestureLine simply contains two
GestureShapeLayer draws a circle or an array of lines.