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

DAY 97

Project 30, part one


Today you’ll be starting a technique project that is entirely unlike everything we’ve done so far. You see, rather than you coding along with me as we build an app from scratch, I’ve already written an app for you.

Sounds good, right? Well, hold up: while this app is vaguely useful, it has some really deep problems. If you try running it on a real device you’ll find it’s extremely slow and likely to crash. If you run in the simulator it will be much less likely to crash, but it will still be equally slow.

In this chapter we’ll be looking at how Xcode, the Simulator, and a dedicated tool called Instruments can help us find and fix performance issues in code. While it’s unlikely you’ll ever see a project that has all of these problems, you will definitely hit them all at some point.

These problems don’t occur because folks are lazy or ignorant. In fact, as Edsger Dijkstra once said, “if debugging is the process of removing software bugs, then programming must be the process of putting them in.” In short, problems are a normal part of the process, so it’s time for you to learn the skills necessary to find and fix them.

Today you have five topics to work through, and you’ll learn about using the Time Profiler and Allocations instruments, how to draw shadows in both Core Graphics and CALayer, re-using table view cells in code, 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.