3 November 2015
How to make a pause and resume button for NSTimer in xcode 7!
Space play/pause · J/L seek 10s · [ ] previous/next
Summary
Creates an Xcode single-view project with a Game controller, moving UILabel, and Pause/ Resume buttons connected through storyboard outlets and actions. Implements an NSTimer-driven label movement, shifting its x-coordinate by 10 and resetting it offscreen when it passes the 320-pixel boundary. Demonstrates pause by invalidating labelTimer and resume by recreating it, confirming repeated pause/resume operation in the simulator.
Insight
Continues the recent shift from experimenting with games to explaining and debugging increasingly structured iOS mechanics.