Mastodon
Episode 35

I Didn't Watch the Video

00:00:00
/
01:19:25

June 29th, 2021

1 hr 19 mins 25 secs

Season 1

Your Hosts
Tags

About this Episode

Welcome to Code Completion, Episode 35! We are a group of iOS developers and educators hoping to share what we love most about development, Apple technology, and completing your code!

Follow us @CodeCompletion on Twitter to hear about our upcoming livestreams, videos, and other content.

Today, we discuss:

Also, join us for #CompleteTheCode and Compiler Error, two segments that test both your knowledge and our knowledge on Swift, Apple, and all things development!

Your hosts for this week:

Be sure to also sign up to our monthly newsletter, where we will recap the topics we discussed, reveal the answers to #CompleteTheCode, and share even more things we learned in between episodes.

You are what makes this show possible, so please be sure to share this with your friends and family who are also interested in any part of the app development process.

Sponsor

This week's episode of Code Completion is brought to you by Super Easy Timer. Search for Super Easy Timer on the Mac App Store to give it a try. https://apps.apple.com/app/apple-store/id1525104124?mt=12

Complete the Code

Which key command in Xcode will allow you to rename the variable you have selected everywhere it appears in the current scope?

// Which key command in Xcode will rename the selected variable
// within the current scope?

let lable = UILabel()
lable.text = "Name"
lable.textColor = .blue
rootView.addSubview(lable)

Be sure to tweet us with hashtag #CompleteTheCode if you know the answer!

Compiler Error

This week's Compiler Error has a theme: Swift Actors!
1 - Actors are a reference type distinct from classes that enable thread-safe access to the data within the actor by gating access behind async members.
2 - Actors can be used from Objective-C so long as the type is marked with @objc, and only non-isolated and asynchronous methods are called.
3 - Actors can be accessed from non-asynchronous code within the same module so long as only let properties or non isolated methods are called.
4 - Actors are implemented using special GCD queues and locks under the hood at compile time, minimizing bugs that arise from incorrect usage of isolated properties.