Back when the original iPad launched Apple showed off one of those “Jony Ive in an infinitely white room” videos, where Jony had this to say: “it’s true: when something exceeds your ability to understand how it works, it sort of becomes magical – and that’s exactly what the iPad is.”
When our apps run, they usually take up the full amount of screen space – they literally take over the iPad, as if the user were holding a device specifically crafted for our app and nothing else. If iOS forced us to display system elements around our app, or if iPads had lots of buttons scattered around the front of its display, that illusion would be broken.
Today you’re going to see just how important this is: we’ll use Core Motion to let the user tip their iPad to control the game. And because our code takes over the full iPad screen, the end result just feels amazing – one huge piece of glass that the player can bounce around as if it were an old wooden toy.
Today you have two topics to work through, and you’ll learn about reading the accelerometer using Core Motion and combining bitmasks using
|, while also getting more practice with
SKAction sequences, and more.
Need help? Tweet me @twostraws!
SAVE 50% To celebrate Black Friday, all our books and bundles are half price, so you can take your Swift knowledge further without spending big! Get the Swift Power Pack to build your iOS career faster, get the Swift Platform Pack to builds apps for macOS, watchOS, and beyond, or get the Swift Plus Pack to learn advanced design patterns, testing skills, and more.
Link copied to your pasteboard.