NEW: Start my new Ultimate Portfolio App course with a free Hacking with Swift+ trial! >>

DAY 88

Project 27, part one

So far I’ve been working hard to introduce you to a variety of Apple’s built-in components: UIViewController, UITableView, UISlider, and more – all really important, and all fundamental building blocks that you’ll use when building your own apps.

Now, though, it’s time for you to learn how to do custom drawing: how to render shapes, colors, text, and images of your choosing, so that you can make images dynamically rather than relying solely on those in your asset catalog.

Apple’s framework for this is called Core Graphics, and it gives you a large blank canvas to render into whatever takes hold of your imagination. As Michelangelo once said, “every block of stone has a statue inside it and it is the task of the sculptor to discover it.”

I’m going to teach you the tools you need to create your own artwork, but what you do with those tools is down to you!

Today you have six topics to work through, and you’ll learn about UIGraphicsImageRenderer, drawing fills and strokes, and insetting a CGRect, while also getting more practice with NSAttributedString, and more.

Need help? Tweet me @twostraws!


Hacking with Swift is sponsored by Instabug

SPONSORED Catch bugs as soon as they happen and know exactly why a crash occurred. Instabug's SDK grabs all the logs they need to fix bugs, crashes and performance issues in minutes instead of days. Get screenshots, device details, network logs, repro steps, and tons of other critical insights needed to resolve issues and prioritize product backlogs straight from your dashboard. It only takes a minute to integrate!

Get started now

Sponsor Hacking with Swift and reach the world's largest Swift community!

100 Days of Swift

The 100 Days of Swift is a free collection of videos, tutorials, tests, and more to help you learn Swift faster. Click here to learn more, or watch the video below.

Back to 100 Days of Swift

Unknown user

You are not logged in

Log in or create account

Link copied to your pasteboard.