No credit card required
Animation with NSTimer and Handling Drag Events
In this chapter you’ll learn:
• To use an NSTimer to generate events at fixed time intervals.
• To group common variables under one name using a struct type.
• To perform simple collision detection.
• To use the touchesMoved:withEvent: method to aim the cannon as the player drags a finger on the screen.
• To process double-tap events to fire the cannon.
• To use the typedef keyword to declare easier-to-understand aliases for previously defined data types.