Apple's Swift Playgrounds app for iPad makes it fun and easy to learn Swift, and I'm really pleased to announce my very first playground book: an interactive way to learn Core Graphics, right on your iPad.

This playground book is built for Swift 4.1 and uses the full Core Graphics API, so you'll learn real skills that you can transfer to iOS and other Apple platforms. Better yet, as you learn you'll see the results of your drawing right next to your code, so you can experiment freely.

This new playground book is completely free, and if you're using an iPad right now you can click the button below to get it. This will subscribe you to the Hacking with Swift playgrounds feed, so when I make more playgrounds in the future you'll be able to get them too.

(Requires an iPad with Swift Playgrounds installed.)

The Learn Core Graphics playground teaches:

  • Drawing rectangles and ellipses
  • Fill and stroke colors
  • Rendering text and images
  • Translation and rotation
  • Blend styles and more!

Every page includes hints if you get stuck, plus there's a Core Graphics sandbox at the end to make it easy to experiment right on your iPad.

I hope you enjoy this new approach to learning Swift – please feel free to get in touch by email at paul@hackingwithswift.com or on Twitter at @twostraws if you have questions, suggestions, or other feedback!

In case you're interested in learning how to make your own playground book, I can highly recommend session 413 from WWDC 2018: Create Your Own Swift Playgrounds Subscription – it inspired me to try this out, and I hope it will inspire you too!

(Requires an iPad with Swift Playgrounds installed.)

Click here to visit the Hacking with Swift store >>